use std::collections::HashMap;
use crossterm::style::Color;
pub type Palette = HashMap<u8, Color>;
pub fn monochrome_palette() -> Palette {
HashMap::new()
}
pub fn color16_palette() -> Palette {
const COLORS_COLOR16: [(u8, Color); 7 + 3] = [
(1, Color::Yellow),
(2, Color::DarkCyan),
(3, Color::Green),
(4, Color::DarkRed),
(5, Color::DarkMagenta),
(6, Color::Red),
(7, Color::Blue),
(253, Color::Black),
(254, Color::DarkGrey),
(255, Color::White),
];
HashMap::from(COLORS_COLOR16)
}
pub fn oklch_palette() -> Palette {
#[rustfmt::skip]
const COLORS_OKLCH_INCRSAT: [(u8, Color); 7 + 3] = [
( 1, Color::Rgb{r:239,g:175,b: 50}), ( 2, Color::Rgb{r: 0,g:199,b:198}), ( 3, Color::Rgb{r:108,g:189,b: 70}), ( 4, Color::Rgb{r:255,g: 87,b:126}), ( 5, Color::Rgb{r:164,g:130,b:255}), ( 6, Color::Rgb{r:245,g:122,b: 62}), ( 7, Color::Rgb{r: 49,g:159,b:253}),
(253, Color::Rgb{r: 0,g: 0,b: 0}), (254, Color::Rgb{r:127,g:127,b:127}), (255, Color::Rgb{r:255,g:255,b:255}), ];
HashMap::from(COLORS_OKLCH_INCRSAT)
}
pub fn fullcolor_palette() -> Palette {
#[rustfmt::skip]
const COLORS_DEFAULT: [(u8, Color); 7 + 3] = [
( 1, Color::Rgb{r:254,g:203,b: 1}), ( 2, Color::Rgb{r: 0,g:159,b:219}), ( 3, Color::Rgb{r:105,g:190,b: 41}), ( 4, Color::Rgb{r:237,g: 41,b: 58}), ( 5, Color::Rgb{r:149,g: 45,b:153}), ( 6, Color::Rgb{r:255,g:121,b: 1}), ( 7, Color::Rgb{r: 0,g:101,b:190}),
(253, Color::Rgb{r: 0,g: 0,b: 0}), (254, Color::Rgb{r:127,g:127,b:127}), (255, Color::Rgb{r:255,g:255,b:255}), ];
HashMap::from(COLORS_DEFAULT)
}
pub fn fahrenheit_palette() -> Palette {
#[rustfmt::skip]
const COLORS_FAHRENHEIT: [(u8, Color); 7 + 3] = [
( 1, Color::Rgb{r:253,g:159,b: 77}), ( 2, Color::Rgb{r:151,g:151,b:150}), ( 3, Color::Rgb{r:254,g:206,b:160}), ( 4, Color::Rgb{r:204,g:115,b: 77}), ( 5, Color::Rgb{r:115,g: 76,b: 77}), ( 6, Color::Rgb{r:203,g: 73,b: 5}), ( 7, Color::Rgb{r:205,g:160,b:116}),
(253, Color::Rgb{r: 0,g: 0,b: 0}), (254, Color::Rgb{r:127,g:127,b:127}), (255, Color::Rgb{r:255,g:255,b:206}), ];
HashMap::from(COLORS_FAHRENHEIT)
}
pub fn gruvbox_palette() -> Palette {
#[rustfmt::skip]
const COLORS_GRUVBOX1: [(u8, Color); 7 + 3] = [
( 1, Color::Rgb{r:250,g:189,b: 47}), ( 2, Color::Rgb{r:142,g:192,b:124}), ( 3, Color::Rgb{r:184,g:187,b: 38}), ( 4, Color::Rgb{r:251,g: 73,b: 52}), ( 5, Color::Rgb{r:211,g:134,b:155}), ( 6, Color::Rgb{r:254,g:128,b: 25}), ( 7, Color::Rgb{r:131,g:165,b:152}),
(253, Color::Rgb{r: 0,g: 0,b: 0}), (254, Color::Rgb{r:127,g:127,b:127}), (255, Color::Rgb{r:255,g:255,b:255}), ];
HashMap::from(COLORS_GRUVBOX1)
}
pub fn sequoia_palette() -> Palette {
#[rustfmt::skip]
const COLORS_SEQUOIA: [(u8, Color); 7 + 3] = [
( 1, Color::Rgb{r:226,g:228,b:237}), ( 2, Color::Rgb{r:148,g:152,b:169}), ( 3, Color::Rgb{r:211,g:213,b:222}), ( 4, Color::Rgb{r:153,g:158,b:178}), ( 5, Color::Rgb{r:124,g:130,b:157}), ( 6, Color::Rgb{r:182,g:186,b:200}), ( 7, Color::Rgb{r: 98,g:105,b:131}),
(253, Color::Rgb{r: 19,g: 19,b: 23}), (254, Color::Rgb{r:134,g:134,b:144}), (255, Color::Rgb{r:232,g:234,b:242}), ];
HashMap::from(COLORS_SEQUOIA)
}
pub fn solarized_palette() -> Palette {
#[rustfmt::skip]
const COLORS_SOLARIZED: [(u8, Color); 7 + 3] = [
( 1, Color::Rgb{r:181,g:137,b: 0}), ( 2, Color::Rgb{r: 42,g:161,b:152}), ( 3, Color::Rgb{r:133,g:153,b: 0}), ( 4, Color::Rgb{r:211,g: 54,b:130}), ( 5, Color::Rgb{r:108,g:113,b:196}), ( 6, Color::Rgb{r:203,g: 75,b: 22}), ( 7, Color::Rgb{r: 38,g:139,b:210}),
(253, Color::Rgb{r: 0,g: 43,b: 54}), (254, Color::Rgb{r:101,g:123,b:131}), (255, Color::Rgb{r:253,g:246,b:227}), ];
HashMap::from(COLORS_SOLARIZED)
}
pub fn terafox_palette() -> Palette {
#[rustfmt::skip]
const COLORS_TERAFOX: [(u8, Color); 7 + 3] = [
( 1, Color::Rgb{r:253,g:178,b:146}), ( 2, Color::Rgb{r:161,g:205,b:216}), ( 3, Color::Rgb{r:142,g:178,b:175}), ( 4, Color::Rgb{r:232,g: 92,b: 81}), ( 5, Color::Rgb{r:173,g: 92,b:124}), ( 6, Color::Rgb{r:237,g:122,b:109}), ( 7, Color::Rgb{r:115,g:163,b:183}),
(253, Color::Rgb{r: 19,g: 31,b: 35}), (254, Color::Rgb{r: 78,g: 81,b: 87}), (255, Color::Rgb{r:222,g:228,b:230}), ];
HashMap::from(COLORS_TERAFOX)
}
pub fn the_matrix_palette() -> Palette {
#[rustfmt::skip]
const COLORS_THE_MATRIX: [(u8, Color); 7 + 3] = [
( 1, Color::Rgb{r:233,g:226,b: 0}), ( 2, Color::Rgb{r: 47,g:192,b:121}), ( 3, Color::Rgb{r: 64,g:153,b: 49}), ( 4, Color::Rgb{r:144,g:215,b: 98}), ( 5, Color::Rgb{r: 35,g:117,b: 90}), ( 6, Color::Rgb{r: 80,g:180,b: 90}), ( 7, Color::Rgb{r: 79,g:126,b:126}),
(253, Color::Rgb{r: 15,g: 25,b: 28}), (254, Color::Rgb{r:113,g:127,b:115}), (255, Color::Rgb{r:234,g:255,b:244}), ];
HashMap::from(COLORS_THE_MATRIX)
}