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

/// YlGn -- 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 YLGN: Colormap = Colormap {
    meta: ColormapMeta {
        name: "YlGn",
        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: &YLGN_LUT,
};

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

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

static YLGN_PALETTE_COLORS: [[u8; 3]; 9] = [
    [255, 255, 229],
    [247, 252, 185],
    [217, 240, 163],
    [173, 221, 142],
    [120, 198, 121],
    [65, 171, 93],
    [35, 132, 67],
    [0, 104, 55],
    [0, 69, 41],
];