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

/// PuBuGn -- 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 PUBUGN: Colormap = Colormap {
    meta: ColormapMeta {
        name: "PuBuGn",
        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: &PUBUGN_LUT,
};

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

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

static PUBUGN_PALETTE_COLORS: [[u8; 3]; 9] = [
    [255, 247, 251],
    [236, 226, 240],
    [208, 209, 230],
    [166, 189, 219],
    [103, 169, 207],
    [54, 144, 192],
    [2, 129, 138],
    [1, 108, 89],
    [1, 70, 54],
];