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

/// RdGy -- 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 RDGY: Colormap = Colormap {
    meta: ColormapMeta {
        name: "RdGy",
        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: &RDGY_LUT,
};

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

/// Original 11-color discrete palette.
pub const RDGY_PALETTE: DiscretePalette = DiscretePalette {
    meta: ColormapMeta {
        name: "RdGy",
        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: &RDGY_PALETTE_COLORS,
};

static RDGY_PALETTE_COLORS: [[u8; 3]; 11] = [
    [103, 0, 31],
    [178, 24, 43],
    [214, 96, 77],
    [244, 165, 130],
    [253, 219, 199],
    [255, 255, 255],
    [224, 224, 224],
    [186, 186, 186],
    [135, 135, 135],
    [77, 77, 77],
    [26, 26, 26],
];