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

/// PuRd -- 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 PURD: Colormap = Colormap {
    meta: ColormapMeta {
        name: "PuRd",
        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: &PURD_LUT,
};

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

/// Original 9-color discrete palette.
pub const PURD_PALETTE: DiscretePalette = DiscretePalette {
    meta: ColormapMeta {
        name: "PuRd",
        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: &PURD_PALETTE_COLORS,
};

static PURD_PALETTE_COLORS: [[u8; 3]; 9] = [
    [247, 244, 249],
    [231, 225, 239],
    [212, 185, 218],
    [201, 148, 199],
    [223, 101, 176],
    [231, 41, 138],
    [206, 18, 86],
    [152, 0, 67],
    [103, 0, 31],
];