prismatica 0.3.1

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

/// RdYlBu -- 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 RDYLBU: Colormap = Colormap {
    meta: ColormapMeta {
        name: "RdYlBu",
        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: &RDYLBU_LUT,
};

static RDYLBU_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, 100],
    [253, 179, 102],
    [253, 181, 103],
    [253, 183, 105],
    [253, 185, 107],
    [253, 187, 109],
    [253, 189, 111],
    [253, 191, 113],
    [253, 193, 115],
    [253, 195, 116],
    [253, 197, 118],
    [253, 199, 120],
    [254, 200, 122],
    [254, 202, 124],
    [254, 204, 126],
    [254, 206, 127],
    [254, 208, 129],
    [254, 210, 131],
    [254, 212, 133],
    [254, 214, 135],
    [254, 216, 137],
    [254, 218, 138],
    [254, 220, 140],
    [254, 222, 142],
    [254, 224, 144],
    [254, 225, 146],
    [254, 226, 148],
    [254, 228, 150],
    [254, 229, 151],
    [254, 230, 153],
    [254, 231, 155],
    [254, 233, 157],
    [254, 234, 159],
    [254, 235, 161],
    [254, 236, 162],
    [254, 237, 164],
    [254, 239, 166],
    [255, 240, 168],
    [255, 241, 170],
    [255, 242, 172],
    [255, 243, 173],
    [255, 245, 175],
    [255, 246, 177],
    [255, 247, 179],
    [255, 248, 181],
    [255, 250, 183],
    [255, 251, 185],
    [255, 252, 186],
    [255, 253, 188],
    [255, 254, 190],
    [254, 255, 192],
    [253, 254, 194],
    [252, 254, 197],
    [251, 253, 199],
    [250, 253, 201],
    [248, 252, 203],
    [247, 252, 206],
    [246, 251, 208],
    [245, 251, 210],
    [243, 251, 212],
    [242, 250, 214],
    [241, 250, 217],
    [240, 249, 219],
    [239, 249, 221],
    [237, 248, 223],
    [236, 248, 226],
    [235, 247, 228],
    [234, 247, 230],
    [233, 246, 232],
    [231, 246, 235],
    [230, 245, 237],
    [229, 245, 239],
    [228, 244, 241],
    [226, 244, 244],
    [225, 243, 246],
    [224, 243, 248],
    [222, 242, 247],
    [220, 241, 247],
    [218, 240, 246],
    [216, 239, 246],
    [214, 238, 245],
    [212, 237, 244],
    [209, 236, 244],
    [207, 235, 243],
    [205, 234, 243],
    [203, 233, 242],
    [201, 232, 242],
    [199, 231, 241],
    [197, 230, 240],
    [195, 229, 240],
    [193, 228, 239],
    [191, 227, 239],
    [189, 226, 238],
    [187, 225, 237],
    [185, 224, 237],
    [182, 223, 236],
    [180, 222, 236],
    [178, 221, 235],
    [176, 220, 234],
    [174, 219, 234],
    [172, 218, 233],
    [170, 216, 233],
    [168, 214, 232],
    [166, 213, 231],
    [163, 211, 230],
    [161, 209, 229],
    [159, 208, 228],
    [157, 206, 227],
    [155, 204, 226],
    [153, 202, 225],
    [151, 201, 224],
    [148, 199, 223],
    [146, 197, 222],
    [144, 195, 221],
    [142, 194, 220],
    [140, 192, 219],
    [138, 190, 218],
    [135, 189, 217],
    [133, 187, 217],
    [131, 185, 216],
    [129, 183, 215],
    [127, 182, 214],
    [125, 180, 213],
    [122, 178, 212],
    [120, 176, 211],
    [118, 175, 210],
    [116, 173, 209],
    [114, 171, 208],
    [112, 169, 207],
    [110, 166, 206],
    [109, 164, 204],
    [107, 162, 203],
    [105, 160, 202],
    [103, 158, 201],
    [101, 155, 200],
    [99, 153, 199],
    [98, 151, 198],
    [96, 149, 196],
    [94, 147, 195],
    [92, 144, 194],
    [90, 142, 193],
    [88, 140, 192],
    [87, 138, 191],
    [85, 136, 190],
    [83, 133, 189],
    [81, 131, 187],
    [79, 129, 186],
    [77, 127, 185],
    [75, 125, 184],
    [74, 122, 183],
    [72, 120, 182],
    [70, 118, 181],
    [69, 116, 179],
    [68, 113, 178],
    [67, 111, 177],
    [66, 108, 176],
    [65, 106, 175],
    [65, 103, 173],
    [64, 101, 172],
    [63, 98, 171],
    [62, 96, 170],
    [62, 94, 168],
    [61, 91, 167],
    [60, 89, 166],
    [59, 86, 165],
    [58, 84, 164],
    [58, 81, 162],
    [57, 79, 161],
    [56, 76, 160],
    [55, 74, 159],
    [54, 71, 158],
    [54, 69, 156],
    [53, 66, 155],
    [52, 64, 154],
    [51, 61, 153],
    [51, 59, 151],
    [50, 56, 150],
    [49, 54, 149],
];

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

static RDYLBU_PALETTE_COLORS: [[u8; 3]; 11] = [
    [165, 0, 38],
    [215, 48, 39],
    [244, 109, 67],
    [253, 174, 97],
    [254, 224, 144],
    [255, 255, 191],
    [224, 243, 248],
    [171, 217, 233],
    [116, 173, 209],
    [69, 117, 180],
    [49, 54, 149],
];