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

/// BrBG -- 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 BRBG: Colormap = Colormap {
    meta: ColormapMeta {
        name: "BrBG",
        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: &BRBG_LUT,
};

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

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

static BRBG_PALETTE_COLORS: [[u8; 3]; 11] = [
    [84, 48, 5],
    [140, 81, 10],
    [191, 129, 45],
    [223, 194, 125],
    [246, 232, 195],
    [245, 245, 245],
    [199, 234, 229],
    [128, 205, 193],
    [53, 151, 143],
    [1, 102, 94],
    [0, 60, 48],
];