palette.rs

1.6 kB · rust · 40 lines

1use crate::colors::Color;23/// The palette black, #000000.4pub const BLACK: Color = Color::rgb(0, 0, 0);5/// The palette white, #ffffff.6pub const WHITE: Color = Color::rgb(255, 255, 255);7/// The palette red, #ff3d40.8pub const RED: Color = Color::rgb(255, 61, 64);9/// The palette orange, #ff8f2c.10pub const ORANGE: Color = Color::rgb(255, 143, 44);11/// The palette yellow, #ffd100.12pub const YELLOW: Color = Color::rgb(255, 209, 0);13/// The palette green, #32cc58.14pub const GREEN: Color = Color::rgb(50, 204, 88);15/// The palette mint, #00d1bb.16pub const MINT: Color = Color::rgb(0, 209, 187);17/// The palette teal, #00cad8.18pub const TEAL: Color = Color::rgb(0, 202, 216);19/// The palette cyan, #1ec9f3.20pub const CYAN: Color = Color::rgb(30, 201, 243);21/// The palette blue, #008cff.22pub const BLUE: Color = Color::rgb(0, 140, 255);23/// The palette indigo, #6768fa.24pub const INDIGO: Color = Color::rgb(103, 104, 250);25/// The palette purple, #d332e9.26pub const PURPLE: Color = Color::rgb(211, 50, 233);27/// The palette pink, #ff325a.28pub const PINK: Color = Color::rgb(255, 50, 90);29/// The palette brown, #b18462.30pub const BROWN: Color = Color::rgb(177, 132, 98);31/// The palette gray, #8e8e93.32pub const GRAY: Color = Color::rgb(142, 142, 147);3334/// The fifteen names, in palette order.35#[rustfmt::skip]36pub const NAMES: [&str; 15] = ["black", "white", "red", "orange", "yellow", "green", "mint", "teal", "cyan", "blue", "indigo", "purple", "pink", "brown", "gray"];3738/// The fifteen colors, in name order.39#[rustfmt::skip]40pub const PALETTE: [Color; 15] = [BLACK, WHITE, RED, ORANGE, YELLOW, GREEN, MINT, TEAL, CYAN, BLUE, INDIGO, PURPLE, PINK, BROWN, GRAY];