prismatica 1.0.0

308 scientific colormaps as compile-time Rust constants
Documentation
// Auto-generated by prismatica xtask -- do not edit
use crate::{Colormap, ColormapKind, ColormapMeta, DiscretePalette};

/// YlOrRd -- Sequential colormap from the colorbrewer collection.
///
/// Author: Cynthia Brewer
/// Perceptually uniform: true
/// CVD friendly: false
///
/// Citation: Brewer, C. A. (2003). ColorBrewer. www.colorbrewer2.org
pub const YLORRD: Colormap = Colormap {
    meta: ColormapMeta {
        name: "YlOrRd",
        collection: "colorbrewer",
        author: "Cynthia Brewer",
        kind: ColormapKind::Sequential,
        perceptually_uniform: true,
        cvd_friendly: false,
        grayscale_safe: false,
        lut_size: 256,
        citation: "Brewer, C. A. (2003). ColorBrewer. www.colorbrewer2.org",
    },
    lut: &YLORRD_LUT,
};

static YLORRD_LUT: [[u8; 3]; 256] = [
    [255, 255, 204],
    [255, 255, 203],
    [255, 254, 202],
    [255, 254, 200],
    [255, 253, 199],
    [255, 253, 198],
    [255, 252, 197],
    [255, 252, 196],
    [255, 251, 194],
    [255, 251, 193],
    [255, 250, 192],
    [255, 250, 191],
    [255, 249, 190],
    [255, 249, 188],
    [255, 248, 187],
    [255, 248, 186],
    [255, 247, 185],
    [255, 247, 183],
    [255, 246, 182],
    [255, 246, 181],
    [255, 245, 180],
    [255, 245, 179],
    [255, 244, 177],
    [255, 244, 176],
    [255, 243, 175],
    [255, 243, 174],
    [255, 242, 173],
    [255, 242, 171],
    [255, 241, 170],
    [255, 241, 169],
    [255, 240, 168],
    [255, 240, 167],
    [255, 239, 165],
    [255, 239, 164],
    [255, 238, 163],
    [255, 238, 162],
    [255, 237, 161],
    [255, 237, 159],
    [255, 236, 158],
    [255, 236, 157],
    [255, 235, 156],
    [255, 234, 155],
    [255, 234, 154],
    [255, 233, 152],
    [255, 233, 151],
    [255, 232, 150],
    [255, 232, 149],
    [255, 231, 148],
    [255, 231, 147],
    [255, 230, 146],
    [255, 230, 144],
    [255, 229, 143],
    [255, 228, 142],
    [255, 228, 141],
    [255, 227, 140],
    [254, 227, 139],
    [254, 226, 137],
    [254, 226, 136],
    [254, 225, 135],
    [254, 225, 134],
    [254, 224, 133],
    [254, 224, 132],
    [254, 223, 131],
    [254, 222, 129],
    [254, 222, 128],
    [254, 221, 127],
    [254, 221, 126],
    [254, 220, 125],
    [254, 220, 124],
    [254, 219, 122],
    [254, 219, 121],
    [254, 218, 120],
    [254, 217, 119],
    [254, 217, 118],
    [254, 216, 117],
    [254, 215, 116],
    [254, 214, 114],
    [254, 213, 113],
    [254, 211, 112],
    [254, 210, 111],
    [254, 209, 110],
    [254, 208, 109],
    [254, 207, 107],
    [254, 206, 106],
    [254, 205, 105],
    [254, 204, 104],
    [254, 203, 103],
    [254, 202, 102],
    [254, 201, 101],
    [254, 200, 99],
    [254, 199, 98],
    [254, 198, 97],
    [254, 197, 96],
    [254, 195, 95],
    [254, 194, 94],
    [254, 193, 92],
    [254, 192, 91],
    [254, 191, 90],
    [254, 190, 89],
    [254, 189, 88],
    [254, 188, 87],
    [254, 187, 86],
    [254, 186, 84],
    [254, 185, 83],
    [254, 184, 82],
    [254, 183, 81],
    [254, 182, 80],
    [254, 180, 79],
    [254, 179, 77],
    [254, 178, 76],
    [254, 177, 76],
    [254, 176, 75],
    [254, 175, 75],
    [254, 174, 74],
    [254, 173, 74],
    [254, 172, 73],
    [254, 171, 73],
    [254, 170, 73],
    [254, 169, 72],
    [254, 168, 72],
    [254, 167, 71],
    [254, 166, 71],
    [254, 165, 70],
    [254, 164, 70],
    [254, 163, 70],
    [254, 162, 69],
    [254, 161, 69],
    [254, 160, 68],
    [253, 159, 68],
    [253, 158, 67],
    [253, 157, 67],
    [253, 156, 66],
    [253, 155, 66],
    [253, 154, 66],
    [253, 153, 65],
    [253, 152, 65],
    [253, 151, 64],
    [253, 150, 64],
    [253, 149, 63],
    [253, 148, 63],
    [253, 147, 63],
    [253, 146, 62],
    [253, 145, 62],
    [253, 144, 61],
    [253, 143, 61],
    [253, 142, 60],
    [253, 141, 60],
    [253, 139, 59],
    [253, 137, 59],
    [253, 135, 58],
    [253, 134, 58],
    [253, 132, 57],
    [253, 130, 57],
    [253, 128, 56],
    [253, 127, 56],
    [253, 125, 55],
    [253, 123, 55],
    [253, 121, 54],
    [253, 120, 54],
    [253, 118, 53],
    [253, 116, 53],
    [253, 115, 52],
    [253, 113, 52],
    [253, 111, 51],
    [252, 109, 51],
    [252, 108, 50],
    [252, 106, 50],
    [252, 104, 49],
    [252, 102, 49],
    [252, 101, 48],
    [252, 99, 48],
    [252, 97, 48],
    [252, 96, 47],
    [252, 94, 47],
    [252, 92, 46],
    [252, 90, 46],
    [252, 89, 45],
    [252, 87, 45],
    [252, 85, 44],
    [252, 83, 44],
    [252, 82, 43],
    [252, 80, 43],
    [252, 78, 42],
    [251, 77, 42],
    [251, 75, 41],
    [250, 74, 41],
    [249, 72, 41],
    [249, 71, 40],
    [248, 70, 40],
    [247, 68, 39],
    [247, 67, 39],
    [246, 65, 39],
    [245, 64, 38],
    [245, 63, 38],
    [244, 61, 37],
    [243, 60, 37],
    [242, 58, 37],
    [242, 57, 36],
    [241, 55, 36],
    [240, 54, 36],
    [240, 53, 35],
    [239, 51, 35],
    [238, 50, 34],
    [238, 48, 34],
    [237, 47, 34],
    [236, 45, 33],
    [236, 44, 33],
    [235, 43, 32],
    [234, 41, 32],
    [234, 40, 32],
    [233, 38, 31],
    [232, 37, 31],
    [232, 35, 31],
    [231, 34, 30],
    [230, 33, 30],
    [229, 31, 29],
    [229, 30, 29],
    [228, 28, 29],
    [227, 27, 28],
    [226, 26, 28],
    [225, 25, 28],
    [224, 24, 29],
    [222, 24, 29],
    [221, 23, 29],
    [220, 22, 29],
    [218, 21, 30],
    [217, 21, 30],
    [215, 20, 30],
    [214, 19, 31],
    [213, 19, 31],
    [211, 18, 31],
    [210, 17, 31],
    [209, 16, 32],
    [207, 16, 32],
    [206, 15, 32],
    [204, 14, 33],
    [203, 14, 33],
    [202, 13, 33],
    [200, 12, 33],
    [199, 11, 34],
    [198, 11, 34],
    [196, 10, 34],
    [195, 9, 34],
    [193, 9, 35],
    [192, 8, 35],
    [191, 7, 35],
    [189, 6, 36],
    [188, 6, 36],
    [187, 5, 36],
    [185, 4, 36],
    [184, 4, 37],
    [182, 3, 37],
    [181, 2, 37],
    [180, 1, 37],
    [178, 1, 38],
    [177, 0, 38],
];

/// Original 8-color discrete palette.
pub const YLORRD_PALETTE: DiscretePalette = DiscretePalette {
    meta: ColormapMeta {
        name: "YlOrRd",
        collection: "colorbrewer",
        author: "Cynthia Brewer",
        kind: ColormapKind::Sequential,
        perceptually_uniform: true,
        cvd_friendly: false,
        grayscale_safe: false,
        lut_size: 8,
        citation: "Brewer, C. A. (2003). ColorBrewer. www.colorbrewer2.org",
    },
    colors: &YLORRD_PALETTE_COLORS,
};

static YLORRD_PALETTE_COLORS: [[u8; 3]; 8] = [
    [255, 255, 204],
    [255, 237, 160],
    [254, 217, 118],
    [254, 178, 76],
    [253, 141, 60],
    [252, 78, 42],
    [227, 26, 28],
    [177, 0, 38],
];