From 512b14872171d73659a650147f169d7e0c5018f5 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Sun, 3 Nov 2024 00:38:30 +0000 Subject: [PATCH] chore: update to v1.7.1 & update examples --- build.rs | 113 +++++++++++++++++++++++++++++------- examples/css.rs | 11 ++++ examples/simple.rs | 43 +++++--------- examples/term_grid.rs | 54 ++++++------------ src/lib.rs | 54 +++++++++++++----- src/palette.json | 130 +++++++++++++++++++++--------------------- 6 files changed, 241 insertions(+), 164 deletions(-) diff --git a/build.rs b/build.rs index bf685bd..5e97882 100644 --- a/build.rs +++ b/build.rs @@ -65,9 +65,9 @@ struct AnsiColorPair { bright: AnsiColor, } -// TODO: pull in the name of the group here (i.e. "Normal" or "Bright") #[derive(Debug, Deserialize)] struct AnsiColor { + name: String, rgb: Rgb, hsl: Hsl, code: u8, @@ -89,18 +89,25 @@ fn main() -> Result<(), Box> { let tokens = [ make_flavor_colors_struct(sample_flavor), make_flavor_colors_all_impl(sample_flavor), + make_flavor_ansi_colors_struct(sample_flavor), + make_flavor_ansi_colors_all_impl(sample_flavor), + make_color_name_enum(sample_flavor), make_color_name_index_impl(sample_flavor), make_color_name_display_impl(sample_flavor), make_color_name_identifier_impl(sample_flavor), make_color_name_fromstr_impl_tokens(sample_flavor), - make_flavor_ansi_colors_struct(sample_flavor), - make_flavor_ansi_colors_all_impl(sample_flavor), + + make_ansi_color_pair_name_enum(sample_flavor), + make_ansi_color_pair_name_index_impl(sample_flavor), + make_ansi_color_pair_name_display_impl(sample_flavor), + make_ansi_color_pair_name_identifier_impl(sample_flavor), + make_ansi_color_pair_name_fromstr_impl_tokens(sample_flavor), + + // TODO: Implement the same methods as `ansi_color_pair` make_ansi_color_name_enum(sample_flavor), - make_ansi_color_name_index_impl(sample_flavor), make_ansi_color_name_display_impl(sample_flavor), - make_ansi_color_name_identifier_impl(sample_flavor), - make_ansi_color_name_fromstr_impl_tokens(sample_flavor), + make_palette_const(&palette), ]; let ast = syn::parse2(tokens.into_iter().collect())?; @@ -110,6 +117,7 @@ fn main() -> Result<(), Box> { Ok(()) } +// NOTE: This currently produces incorrect URLs as we need to duplicate some palette circles and put them in a consistent format before we can get all the normal and bright colour circles fn color_img(filename: &str) -> String { format!( r#""# @@ -199,8 +207,8 @@ fn make_flavor_ansi_colors_struct(sample_flavor: &Flavor) -> TokenStream { #[derive(Clone, Copy, Debug, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct AnsiColorPair { - /// The [`AnsiColorName`] for this color. - pub name: AnsiColorName, + /// The [`AnsiColorPairName`] for this color. + pub name: AnsiColorPairName, /// Order of the ANSI color in the palette spec. pub order: u32, /// The normal color. @@ -213,6 +221,8 @@ fn make_flavor_ansi_colors_struct(sample_flavor: &Flavor) -> TokenStream { #[derive(Clone, Copy, Debug, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct AnsiColor { + /// The [`AnsiColorName`] for this color. + pub name: AnsiColorName, /// The color represented as a six-digit hex string with a leading hash (#). pub hex: Hex, /// The color represented as individual red, green, and blue channels. @@ -280,7 +290,7 @@ fn make_color_name_enum(sample_flavor: &Flavor) -> TokenStream { } } -fn make_ansi_color_name_enum(sample_flavor: &Flavor) -> TokenStream { +fn make_ansi_color_pair_name_enum(sample_flavor: &Flavor) -> TokenStream { let variants = ansi_colors_in_order(sample_flavor).map(|(name, _)| { let ident = format_ident!("{}", titlecase(name)); let color_imgs = format!(" {}", ansi_color_imgs(name)); @@ -293,6 +303,35 @@ fn make_ansi_color_name_enum(sample_flavor: &Flavor) -> TokenStream { /// Enum of all ANSI Catppuccin colors. Can be used to index into a [`FlavorAnsiColors`]. #[derive(Copy, Clone, Eq, PartialEq, Debug)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + pub enum AnsiColorPairName { + #(#variants),* + } + } +} + +fn make_ansi_color_name_enum(sample_flavor: &Flavor) -> TokenStream { + fn enum_variant(color_pair: &AnsiColor) -> TokenStream { + let name = &color_pair.name.replace(" ", ""); + let ident = format_ident!("{}", name); + let color_imgs = format!(" {}", ansi_color_imgs(name)); + quote! { + #[doc = #color_imgs] + #ident + } + } + let variants = ansi_colors_in_order(sample_flavor).map(|(_, color_pair)| { + let normal_variants = enum_variant(&color_pair.normal); + let bright_variants = enum_variant(&color_pair.bright); + quote! { + #normal_variants, + #bright_variants + } + }); + + quote! { + /// Enum of all ANSI Catppuccin colors. + #[derive(Copy, Clone, Eq, PartialEq, Debug)] + #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub enum AnsiColorName { #(#variants),* } @@ -334,20 +373,20 @@ fn make_color_name_index_impl(sample_flavor: &Flavor) -> TokenStream { } } -fn make_ansi_color_name_index_impl(sample_flavor: &Flavor) -> TokenStream { +fn make_ansi_color_pair_name_index_impl(sample_flavor: &Flavor) -> TokenStream { let first = ansi_colors_in_order(sample_flavor).map(|(identifier, _)| { let variant = format_ident!("{}", titlecase(identifier)); let ident = format_ident!("{}", identifier); quote! { - AnsiColorName::#variant => &self.#ident + AnsiColorPairName::#variant => &self.#ident } }); let second = first.clone(); quote! { - impl Index for FlavorAnsiColors { + impl Index for FlavorAnsiColors { type Output = AnsiColorPair; - fn index(&self, index: AnsiColorName) -> &Self::Output { + fn index(&self, index: AnsiColorPairName) -> &Self::Output { match index { #(#first),* } @@ -360,7 +399,7 @@ fn make_ansi_color_name_index_impl(sample_flavor: &Flavor) -> TokenStream { /// This is equivalent to using the index operator, but can also be used in /// const contexts. #[must_use] - pub const fn get_ansi_color(&self, name: AnsiColorName) -> &AnsiColorPair { + pub const fn get_ansi_color(&self, name: AnsiColorPairName) -> &AnsiColorPair { match name { #(#second),* } @@ -388,7 +427,7 @@ fn make_color_name_display_impl(sample_flavor: &Flavor) -> TokenStream { } } -fn make_ansi_color_name_display_impl(sample_flavor: &Flavor) -> TokenStream { +fn make_ansi_color_pair_name_display_impl(sample_flavor: &Flavor) -> TokenStream { let match_arms = ansi_colors_in_order(sample_flavor).map(|(identifier, _)| { let name = titlecase(identifier); let variant = format_ident!("{name}"); @@ -396,6 +435,33 @@ fn make_ansi_color_name_display_impl(sample_flavor: &Flavor) -> TokenStream { Self::#variant => write!(f, #name) } }); + quote! { + impl std::fmt::Display for AnsiColorPairName { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + #(#match_arms),* + } + } + } + } +} + +fn make_ansi_color_name_display_impl(sample_flavor: &Flavor) -> TokenStream { + fn match_arm(color_pair: &AnsiColor) -> TokenStream { + let name = &color_pair.name; + let variant = format_ident!("{}", name.replace(" ", "")); + quote! { + Self::#variant => write!(f, #name) + } + } + let match_arms = ansi_colors_in_order(sample_flavor).map(|(_, color_pair)| { + let normal_variants = match_arm(&color_pair.normal); + let bright_variants = match_arm(&color_pair.bright); + quote! { + #normal_variants, + #bright_variants + } + }); quote! { impl std::fmt::Display for AnsiColorName { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { @@ -437,7 +503,7 @@ fn make_color_name_identifier_impl(sample_flavor: &Flavor) -> TokenStream { } } -fn make_ansi_color_name_identifier_impl(sample_flavor: &Flavor) -> TokenStream { +fn make_ansi_color_pair_name_identifier_impl(sample_flavor: &Flavor) -> TokenStream { let match_arms = ansi_colors_in_order(sample_flavor).map(|(identifier, _)| { let variant = format_ident!("{}", titlecase(identifier)); quote! { @@ -445,7 +511,7 @@ fn make_ansi_color_name_identifier_impl(sample_flavor: &Flavor) -> TokenStream { } }); quote! { - impl AnsiColorName { + impl AnsiColorPairName { /// Get the ANSI color's identifier; the lowercase key used to identify the color. /// This differs from `to_string` in that it's intended for machine usage /// rather than presentation. @@ -490,7 +556,7 @@ fn make_color_name_fromstr_impl_tokens(sample_flavor: &Flavor) -> TokenStream { } } -fn make_ansi_color_name_fromstr_impl_tokens(sample_flavor: &Flavor) -> TokenStream { +fn make_ansi_color_pair_name_fromstr_impl_tokens(sample_flavor: &Flavor) -> TokenStream { let match_arms = ansi_colors_in_order(sample_flavor) .map(|(identifier, _)| { let variant = format_ident!("{}", titlecase(identifier)); @@ -500,7 +566,7 @@ fn make_ansi_color_name_fromstr_impl_tokens(sample_flavor: &Flavor) -> TokenStre }) .collect::>(); quote! { - impl std::str::FromStr for AnsiColorName { + impl std::str::FromStr for AnsiColorPairName { type Err = ParseColorNameError; fn from_str(s: &str) -> Result { @@ -585,6 +651,7 @@ fn make_ansi_color_entry(identifier: &str, ansi_color_pair: &AnsiColorPair) -> T order, normal: AnsiColor { + name: normal_name, code: normal_code, rgb: Rgb { @@ -598,10 +665,10 @@ fn make_ansi_color_entry(identifier: &str, ansi_color_pair: &AnsiColorPair) -> T s: normal_s, l: normal_l, }, - .. }, bright: AnsiColor { + name: bright_name, code: bright_code, rgb: Rgb { @@ -620,6 +687,8 @@ fn make_ansi_color_entry(identifier: &str, ansi_color_pair: &AnsiColorPair) -> T } = ansi_color_pair; let ansi_name_variant = format_ident!("{}", name); + let normal_name_variant = format_ident!("{}", normal_name); + let bright_name_variant = format_ident!("{}", bright_name.replace(" ", "")); let normal_rgb = quote! { Rgb { r: #normal_r, g: #normal_g, b: #normal_b } }; let normal_hsl = quote! { Hsl { h: #normal_h, s: #normal_s, l: #normal_l } }; let bright_rgb = quote! { Rgb { r: #bright_r, g: #bright_g, b: #bright_b } }; @@ -627,15 +696,17 @@ fn make_ansi_color_entry(identifier: &str, ansi_color_pair: &AnsiColorPair) -> T quote! { #ident: AnsiColorPair { - name: AnsiColorName::#ansi_name_variant, + name: AnsiColorPairName::#ansi_name_variant, order: #order, normal: AnsiColor { + name: AnsiColorName::#normal_name_variant, hex: Hex(#normal_rgb), rgb: #normal_rgb, hsl: #normal_hsl, code: #normal_code, }, bright: AnsiColor { + name: AnsiColorName::#bright_name_variant, hex: Hex(#bright_rgb), rgb: #bright_rgb, hsl: #bright_hsl, diff --git a/examples/css.rs b/examples/css.rs index 71bc67f..d23d279 100644 --- a/examples/css.rs +++ b/examples/css.rs @@ -12,4 +12,15 @@ fn main() { let lighter = hsl.lighten(percent(20)); println!("20% lighter: {lighter}"); + + let ansi_normal_magenta = catppuccin::PALETTE.mocha.ansi_colors.magenta.normal; + let ansi_bright_magenta = catppuccin::PALETTE.mocha.ansi_colors.magenta.bright; + let ansi_magenta_normal_rgb: css_colors::RGB = ansi_normal_magenta.into(); + let ansi_magenta_bright_rgb: css_colors::RGB = ansi_bright_magenta.into(); + + println!("ANSI Magenta RGB: {}", ansi_magenta_normal_rgb.to_css()); + println!( + "ANSI Bright Magenta RGB: {}", + ansi_magenta_bright_rgb.to_css() + ); } diff --git a/examples/simple.rs b/examples/simple.rs index 45dcd35..51bd809 100644 --- a/examples/simple.rs +++ b/examples/simple.rs @@ -1,5 +1,5 @@ //! Simple example showing how to get colors from the Catppuccin palette. -use catppuccin::{AnsiColorPair, ColorName, Rgb, PALETTE}; +use catppuccin::{AnsiColor, AnsiColorName, ColorName, Rgb, PALETTE}; fn main() { let latte_teal = PALETTE.latte.colors.teal; @@ -22,32 +22,19 @@ fn main() { println!("Mocha's {} is {}", mocha_mauve.name, mocha_mauve.hex); - for AnsiColorPair { - name, - normal, - bright, - .. - } in mocha.ansi_colors.iter() - { - println!( - r#" - Mocha ANSI {}: - Hex: {}, - RGB: {:?}, - HSL: {:?}, - Code: {} - "#, - name, normal.hex, normal.rgb, normal.hsl, normal.code - ); - println!( - r#" - Mocha Bright ANSI {}: - Hex: {}, - RGB: {:?}, - HSL: {:?}, - Code: {} - "#, - name, bright.hex, bright.rgb, bright.hsl, bright.code - ); + for mocha_ansi_color_pairs in &mocha.ansi_colors { + for AnsiColor { + name, + rgb, + hsl, + code, + hex, + } in [mocha_ansi_color_pairs.normal, mocha_ansi_color_pairs.bright] + { + println!( + "Mocha ANSI [{:2}] {:15} → {:6} {:3?} {:19?}", + code, name.to_string(), hex, rgb, hsl, + ); + } } } diff --git a/examples/term_grid.rs b/examples/term_grid.rs index 3a772da..e4dfe46 100644 --- a/examples/term_grid.rs +++ b/examples/term_grid.rs @@ -53,42 +53,26 @@ fn main() { .paint(format!("{} ANSI", flavor.name)) ); - for ansi_color in &flavor.ansi_colors { - let name = format!("{}", ansi_color.name); - let rgb = format!( - "rgb({:3}, {:3}, {:3})", - ansi_color.normal.rgb.r, ansi_color.normal.rgb.g, ansi_color.normal.rgb.b - ); - let hsl = format!( - "hsl({:3.0}, {:5.3}, {:5.3})", - ansi_color.normal.hsl.h, ansi_color.normal.hsl.s, ansi_color.normal.hsl.l - ); - println!( - "{} {:18} → {:6} {:18} {:18}", - ansi_term_ansi_color(&ansi_color.normal).reverse().paint(" "), - name, - ansi_color.normal.hex, - rgb, - hsl, - ); + for ansi_color_pair in &flavor.ansi_colors { + for ansi_color in [ansi_color_pair.normal, ansi_color_pair.bright] { + let rgb = format!( + "rgb({:3}, {:3}, {:3})", + ansi_color.rgb.r, ansi_color.rgb.g, ansi_color.rgb.b + ); + let hsl = format!( + "hsl({:3.0}, {:5.3}, {:5.3})", + ansi_color.hsl.h, ansi_color.hsl.s, ansi_color.hsl.l + ); - let bright_name = format!("Bright {}", ansi_color.name); - let bright_rgb = format!( - "rgb({:3}, {:3}, {:3})", - ansi_color.bright.rgb.r, ansi_color.bright.rgb.g, ansi_color.bright.rgb.b - ); - let bright_hsl = format!( - "hsl({:3.0}, {:5.3}, {:5.3})", - ansi_color.bright.hsl.h, ansi_color.bright.hsl.s, ansi_color.bright.hsl.l - ); - println!( - "{} {:18} → {:6} {:18} {:18}", - ansi_term_ansi_color(&ansi_color.bright).reverse().paint(" "), - bright_name, - ansi_color.bright.hex, - bright_rgb, - bright_hsl, - ); + println!( + "{} {:18} → {:6} {:18} {:18}", + ansi_term_ansi_color(&ansi_color).reverse().paint(" "), + ansi_color.name.to_string(), + ansi_color.hex, + rgb, + hsl, + ); + } } println!(); diff --git a/src/lib.rs b/src/lib.rs index 26b423a..da71867 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -503,24 +503,48 @@ impl From<(f64, f64, f64)> for Hsl { } #[cfg(feature = "css-colors")] -impl From for css_colors::RGB { - fn from(value: Color) -> Self { - Self { - r: css_colors::Ratio::from_u8(value.rgb.r), - g: css_colors::Ratio::from_u8(value.rgb.g), - b: css_colors::Ratio::from_u8(value.rgb.b), +mod css_colors { + use crate::{AnsiColor, Color}; + + impl From for css_colors::RGB { + fn from(value: Color) -> Self { + Self { + r: css_colors::Ratio::from_u8(value.rgb.r), + g: css_colors::Ratio::from_u8(value.rgb.g), + b: css_colors::Ratio::from_u8(value.rgb.b), + } } } -} -#[cfg(feature = "css-colors")] -impl From for css_colors::HSL { - fn from(value: Color) -> Self { - #[allow(clippy::cast_possible_truncation, clippy::cast_sign_loss)] - Self { - h: css_colors::Angle::new(value.hsl.h as u16), - s: css_colors::Ratio::from_f32(value.hsl.s as f32), - l: css_colors::Ratio::from_f32(value.hsl.l as f32), + impl From for css_colors::RGB { + fn from(value: AnsiColor) -> Self { + Self { + r: css_colors::Ratio::from_u8(value.rgb.r), + g: css_colors::Ratio::from_u8(value.rgb.g), + b: css_colors::Ratio::from_u8(value.rgb.b), + } + } + } + + impl From for css_colors::HSL { + fn from(value: Color) -> Self { + #[allow(clippy::cast_possible_truncation, clippy::cast_sign_loss)] + Self { + h: css_colors::Angle::new(value.hsl.h as u16), + s: css_colors::Ratio::from_f32(value.hsl.s as f32), + l: css_colors::Ratio::from_f32(value.hsl.l as f32), + } + } + } + + impl From for css_colors::HSL { + fn from(value: AnsiColor) -> Self { + #[allow(clippy::cast_possible_truncation, clippy::cast_sign_loss)] + Self { + h: css_colors::Angle::new(value.hsl.h as u16), + s: css_colors::Ratio::from_f32(value.hsl.s as f32), + l: css_colors::Ratio::from_f32(value.hsl.l as f32), + } } } } diff --git a/src/palette.json b/src/palette.json index c519d8b..b3ae90e 100644 --- a/src/palette.json +++ b/src/palette.json @@ -1,5 +1,5 @@ { - "version": "1.7.0", + "version": "1.7.1", "latte": { "name": "Latte", "emoji": "🌻", @@ -428,7 +428,7 @@ "name": "Black", "order": 0, "normal": { - "name": "Normal", + "name": "Black", "hex": "#5c5f77", "rgb": { "r": 92, @@ -443,7 +443,7 @@ "code": 0 }, "bright": { - "name": "Bright", + "name": "Bright Black", "hex": "#6c6f85", "rgb": { "r": 108, @@ -462,7 +462,7 @@ "name": "Red", "order": 1, "normal": { - "name": "Normal", + "name": "Red", "hex": "#d20f39", "rgb": { "r": 210, @@ -477,7 +477,7 @@ "code": 1 }, "bright": { - "name": "Bright", + "name": "Bright Red", "hex": "#de293e", "rgb": { "r": 222, @@ -496,7 +496,7 @@ "name": "Green", "order": 2, "normal": { - "name": "Normal", + "name": "Green", "hex": "#40a02b", "rgb": { "r": 64, @@ -511,7 +511,7 @@ "code": 2 }, "bright": { - "name": "Bright", + "name": "Bright Green", "hex": "#49af3d", "rgb": { "r": 73, @@ -530,7 +530,7 @@ "name": "Yellow", "order": 3, "normal": { - "name": "Normal", + "name": "Yellow", "hex": "#df8e1d", "rgb": { "r": 223, @@ -545,7 +545,7 @@ "code": 3 }, "bright": { - "name": "Bright", + "name": "Bright Yellow", "hex": "#eea02d", "rgb": { "r": 238, @@ -564,7 +564,7 @@ "name": "Blue", "order": 4, "normal": { - "name": "Normal", + "name": "Blue", "hex": "#1e66f5", "rgb": { "r": 30, @@ -579,7 +579,7 @@ "code": 4 }, "bright": { - "name": "Bright", + "name": "Bright Blue", "hex": "#456eff", "rgb": { "r": 69, @@ -598,7 +598,7 @@ "name": "Magenta", "order": 5, "normal": { - "name": "Normal", + "name": "Magenta", "hex": "#ea76cb", "rgb": { "r": 234, @@ -613,7 +613,7 @@ "code": 5 }, "bright": { - "name": "Bright", + "name": "Bright Magenta", "hex": "#fe85d8", "rgb": { "r": 254, @@ -632,7 +632,7 @@ "name": "Cyan", "order": 6, "normal": { - "name": "Normal", + "name": "Cyan", "hex": "#179299", "rgb": { "r": 23, @@ -647,7 +647,7 @@ "code": 6 }, "bright": { - "name": "Bright", + "name": "Bright Cyan", "hex": "#2d9fa8", "rgb": { "r": 45, @@ -666,7 +666,7 @@ "name": "White", "order": 7, "normal": { - "name": "Normal", + "name": "White", "hex": "#acb0be", "rgb": { "r": 172, @@ -681,7 +681,7 @@ "code": 7 }, "bright": { - "name": "Bright", + "name": "Bright White", "hex": "#bcc0cc", "rgb": { "r": 188, @@ -1126,7 +1126,7 @@ "name": "Black", "order": 0, "normal": { - "name": "Normal", + "name": "Black", "hex": "#51576d", "rgb": { "r": 81, @@ -1141,7 +1141,7 @@ "code": 0 }, "bright": { - "name": "Bright", + "name": "Bright Black", "hex": "#626880", "rgb": { "r": 98, @@ -1160,7 +1160,7 @@ "name": "Red", "order": 1, "normal": { - "name": "Normal", + "name": "Red", "hex": "#e78284", "rgb": { "r": 231, @@ -1175,7 +1175,7 @@ "code": 1 }, "bright": { - "name": "Bright", + "name": "Bright Red", "hex": "#e67172", "rgb": { "r": 230, @@ -1194,7 +1194,7 @@ "name": "Green", "order": 2, "normal": { - "name": "Normal", + "name": "Green", "hex": "#a6d189", "rgb": { "r": 166, @@ -1209,7 +1209,7 @@ "code": 2 }, "bright": { - "name": "Bright", + "name": "Bright Green", "hex": "#8ec772", "rgb": { "r": 142, @@ -1228,7 +1228,7 @@ "name": "Yellow", "order": 3, "normal": { - "name": "Normal", + "name": "Yellow", "hex": "#e5c890", "rgb": { "r": 229, @@ -1243,7 +1243,7 @@ "code": 3 }, "bright": { - "name": "Bright", + "name": "Bright Yellow", "hex": "#d9ba73", "rgb": { "r": 217, @@ -1262,7 +1262,7 @@ "name": "Blue", "order": 4, "normal": { - "name": "Normal", + "name": "Blue", "hex": "#8caaee", "rgb": { "r": 140, @@ -1277,7 +1277,7 @@ "code": 4 }, "bright": { - "name": "Bright", + "name": "Bright Blue", "hex": "#7b9ef0", "rgb": { "r": 123, @@ -1296,7 +1296,7 @@ "name": "Magenta", "order": 5, "normal": { - "name": "Normal", + "name": "Magenta", "hex": "#f4b8e4", "rgb": { "r": 244, @@ -1311,7 +1311,7 @@ "code": 5 }, "bright": { - "name": "Bright", + "name": "Bright Magenta", "hex": "#f2a4db", "rgb": { "r": 242, @@ -1330,7 +1330,7 @@ "name": "Cyan", "order": 6, "normal": { - "name": "Normal", + "name": "Cyan", "hex": "#81c8be", "rgb": { "r": 129, @@ -1345,7 +1345,7 @@ "code": 6 }, "bright": { - "name": "Bright", + "name": "Bright Cyan", "hex": "#5abfb5", "rgb": { "r": 90, @@ -1364,7 +1364,7 @@ "name": "White", "order": 7, "normal": { - "name": "Normal", + "name": "White", "hex": "#a5adce", "rgb": { "r": 165, @@ -1379,7 +1379,7 @@ "code": 7 }, "bright": { - "name": "Bright", + "name": "Bright White", "hex": "#b5bfe2", "rgb": { "r": 181, @@ -1824,7 +1824,7 @@ "name": "Black", "order": 0, "normal": { - "name": "Normal", + "name": "Black", "hex": "#494d64", "rgb": { "r": 73, @@ -1839,7 +1839,7 @@ "code": 0 }, "bright": { - "name": "Bright", + "name": "Bright Black", "hex": "#5b6078", "rgb": { "r": 91, @@ -1858,7 +1858,7 @@ "name": "Red", "order": 1, "normal": { - "name": "Normal", + "name": "Red", "hex": "#ed8796", "rgb": { "r": 237, @@ -1873,7 +1873,7 @@ "code": 1 }, "bright": { - "name": "Bright", + "name": "Bright Red", "hex": "#ec7486", "rgb": { "r": 236, @@ -1892,7 +1892,7 @@ "name": "Green", "order": 2, "normal": { - "name": "Normal", + "name": "Green", "hex": "#a6da95", "rgb": { "r": 166, @@ -1907,7 +1907,7 @@ "code": 2 }, "bright": { - "name": "Bright", + "name": "Bright Green", "hex": "#8ccf7f", "rgb": { "r": 140, @@ -1926,7 +1926,7 @@ "name": "Yellow", "order": 3, "normal": { - "name": "Normal", + "name": "Yellow", "hex": "#eed49f", "rgb": { "r": 238, @@ -1941,7 +1941,7 @@ "code": 3 }, "bright": { - "name": "Bright", + "name": "Bright Yellow", "hex": "#e1c682", "rgb": { "r": 225, @@ -1960,7 +1960,7 @@ "name": "Blue", "order": 4, "normal": { - "name": "Normal", + "name": "Blue", "hex": "#8aadf4", "rgb": { "r": 138, @@ -1975,7 +1975,7 @@ "code": 4 }, "bright": { - "name": "Bright", + "name": "Bright Blue", "hex": "#78a1f6", "rgb": { "r": 120, @@ -1994,7 +1994,7 @@ "name": "Magenta", "order": 5, "normal": { - "name": "Normal", + "name": "Magenta", "hex": "#f5bde6", "rgb": { "r": 245, @@ -2009,7 +2009,7 @@ "code": 5 }, "bright": { - "name": "Bright", + "name": "Bright Magenta", "hex": "#f2a9dd", "rgb": { "r": 242, @@ -2028,7 +2028,7 @@ "name": "Cyan", "order": 6, "normal": { - "name": "Normal", + "name": "Cyan", "hex": "#8bd5ca", "rgb": { "r": 139, @@ -2043,7 +2043,7 @@ "code": 6 }, "bright": { - "name": "Bright", + "name": "Bright Cyan", "hex": "#63cbc0", "rgb": { "r": 99, @@ -2062,7 +2062,7 @@ "name": "White", "order": 7, "normal": { - "name": "Normal", + "name": "White", "hex": "#a5adcb", "rgb": { "r": 165, @@ -2077,7 +2077,7 @@ "code": 7 }, "bright": { - "name": "Bright", + "name": "Bright White", "hex": "#b8c0e0", "rgb": { "r": 184, @@ -2522,7 +2522,7 @@ "name": "Black", "order": 0, "normal": { - "name": "Normal", + "name": "Black", "hex": "#45475a", "rgb": { "r": 69, @@ -2537,7 +2537,7 @@ "code": 0 }, "bright": { - "name": "Bright", + "name": "Bright Black", "hex": "#585b70", "rgb": { "r": 88, @@ -2556,7 +2556,7 @@ "name": "Red", "order": 1, "normal": { - "name": "Normal", + "name": "Red", "hex": "#f38ba8", "rgb": { "r": 243, @@ -2571,7 +2571,7 @@ "code": 1 }, "bright": { - "name": "Bright", + "name": "Bright Red", "hex": "#f37799", "rgb": { "r": 243, @@ -2590,7 +2590,7 @@ "name": "Green", "order": 2, "normal": { - "name": "Normal", + "name": "Green", "hex": "#a6e3a1", "rgb": { "r": 166, @@ -2605,7 +2605,7 @@ "code": 2 }, "bright": { - "name": "Bright", + "name": "Bright Green", "hex": "#89d88b", "rgb": { "r": 137, @@ -2624,7 +2624,7 @@ "name": "Yellow", "order": 3, "normal": { - "name": "Normal", + "name": "Yellow", "hex": "#f9e2af", "rgb": { "r": 249, @@ -2639,7 +2639,7 @@ "code": 3 }, "bright": { - "name": "Bright", + "name": "Bright Yellow", "hex": "#ebd391", "rgb": { "r": 235, @@ -2658,7 +2658,7 @@ "name": "Blue", "order": 4, "normal": { - "name": "Normal", + "name": "Blue", "hex": "#89b4fa", "rgb": { "r": 137, @@ -2673,7 +2673,7 @@ "code": 4 }, "bright": { - "name": "Bright", + "name": "Bright Blue", "hex": "#74a8fc", "rgb": { "r": 116, @@ -2692,7 +2692,7 @@ "name": "Magenta", "order": 5, "normal": { - "name": "Normal", + "name": "Magenta", "hex": "#f5c2e7", "rgb": { "r": 245, @@ -2707,7 +2707,7 @@ "code": 5 }, "bright": { - "name": "Bright", + "name": "Bright Magenta", "hex": "#f2aede", "rgb": { "r": 242, @@ -2726,7 +2726,7 @@ "name": "Cyan", "order": 6, "normal": { - "name": "Normal", + "name": "Cyan", "hex": "#94e2d5", "rgb": { "r": 148, @@ -2741,7 +2741,7 @@ "code": 6 }, "bright": { - "name": "Bright", + "name": "Bright Cyan", "hex": "#6bd7ca", "rgb": { "r": 107, @@ -2760,7 +2760,7 @@ "name": "White", "order": 7, "normal": { - "name": "Normal", + "name": "White", "hex": "#a6adc8", "rgb": { "r": 166, @@ -2775,7 +2775,7 @@ "code": 7 }, "bright": { - "name": "Bright", + "name": "Bright White", "hex": "#bac2de", "rgb": { "r": 186,