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};

/// RdYlGn -- Diverging 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 RDYLGN: Colormap = Colormap {
    meta: ColormapMeta {
        name: "RdYlGn",
        collection: "colorbrewer",
        author: "Cynthia Brewer",
        kind: ColormapKind::Diverging,
        perceptually_uniform: true,
        cvd_friendly: false,
        grayscale_safe: false,
        lut_size: 256,
        citation: "Brewer, C. A. (2003). ColorBrewer. www.colorbrewer2.org",
    },
    lut: &RDYLGN_LUT,
};

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

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

static RDYLGN_PALETTE_COLORS: [[u8; 3]; 11] = [
    [165, 0, 38],
    [215, 48, 39],
    [244, 109, 67],
    [253, 174, 97],
    [254, 224, 139],
    [255, 255, 191],
    [217, 239, 139],
    [166, 217, 106],
    [102, 189, 99],
    [26, 152, 80],
    [0, 104, 55],
];