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

/// Tableau10 -- Qualitative colormap from the d3 collection.
///
/// Author: Mike Bostock / d3
/// Perceptually uniform: false
/// CVD friendly: false
///
/// Citation: Bostock, M. d3-scale-chromatic. github.com/d3/d3-scale-chromatic
pub const TABLEAU10: Colormap = Colormap {
    meta: ColormapMeta {
        name: "Tableau10",
        collection: "d3",
        author: "Mike Bostock / d3",
        kind: ColormapKind::Qualitative,
        perceptually_uniform: false,
        cvd_friendly: false,
        grayscale_safe: false,
        lut_size: 256,
        citation: "Bostock, M. d3-scale-chromatic. github.com/d3/d3-scale-chromatic",
    },
    lut: &TABLEAU10_LUT,
};

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

/// Original 10-color discrete palette.
pub const TABLEAU10_PALETTE: DiscretePalette = DiscretePalette {
    meta: ColormapMeta {
        name: "Tableau10",
        collection: "d3",
        author: "Mike Bostock / d3",
        kind: ColormapKind::Qualitative,
        perceptually_uniform: false,
        cvd_friendly: false,
        grayscale_safe: false,
        lut_size: 10,
        citation: "Bostock, M. d3-scale-chromatic. github.com/d3/d3-scale-chromatic",
    },
    colors: &TABLEAU10_PALETTE_COLORS,
};

static TABLEAU10_PALETTE_COLORS: [[u8; 3]; 10] = [
    [78, 121, 167],
    [242, 142, 44],
    [225, 87, 89],
    [118, 183, 178],
    [89, 161, 79],
    [237, 201, 73],
    [175, 122, 161],
    [255, 157, 167],
    [156, 117, 95],
    [186, 176, 171],
];