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

/// Safe -- Qualitative colormap from the cartocolors collection.
///
/// Author: CARTO
/// Perceptually uniform: false
/// CVD friendly: false
///
/// Citation: CARTO. CartoColor. carto.com/carto-colors
pub const SAFE: Colormap = Colormap {
    meta: ColormapMeta {
        name: "Safe",
        collection: "cartocolors",
        author: "CARTO",
        kind: ColormapKind::Qualitative,
        perceptually_uniform: false,
        cvd_friendly: false,
        grayscale_safe: false,
        lut_size: 256,
        citation: "CARTO. CartoColor. carto.com/carto-colors",
    },
    lut: &SAFE_LUT,
};

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

/// Original 12-color discrete palette.
pub const SAFE_PALETTE: DiscretePalette = DiscretePalette {
    meta: ColormapMeta {
        name: "Safe",
        collection: "cartocolors",
        author: "CARTO",
        kind: ColormapKind::Qualitative,
        perceptually_uniform: false,
        cvd_friendly: false,
        grayscale_safe: false,
        lut_size: 12,
        citation: "CARTO. CartoColor. carto.com/carto-colors",
    },
    colors: &SAFE_PALETTE_COLORS,
};

static SAFE_PALETTE_COLORS: [[u8; 3]; 12] = [
    [136, 204, 238],
    [204, 102, 119],
    [221, 204, 119],
    [17, 119, 51],
    [51, 34, 136],
    [170, 68, 153],
    [68, 170, 153],
    [153, 153, 51],
    [136, 34, 85],
    [102, 17, 0],
    [102, 153, 204],
    [136, 136, 136],
];