From 90334c8a4636a358aa1346f56438b03686036220 Mon Sep 17 00:00:00 2001 From: Darren Kaste Date: Fri, 31 May 2019 10:19:33 -0400 Subject: [PATCH] Added associated constants for named colors --- examples/blit.rs | 13 +- examples/colors.rs | 4 +- examples/samples.rs | 52 ++-- examples/shapes.rs | 2 +- src/colors.rs | 577 +++++++++++++++++++++++++++++--------------- 5 files changed, 422 insertions(+), 226 deletions(-) diff --git a/examples/blit.rs b/examples/blit.rs index 3a939ebd1..5ed419835 100644 --- a/examples/blit.rs +++ b/examples/blit.rs @@ -1,8 +1,7 @@ extern crate tcod; use tcod::console; -use tcod::{Console, RootConsole, OffscreenConsole}; -use tcod::colors; +use tcod::{Console, RootConsole, OffscreenConsole, Color}; fn main() { @@ -17,12 +16,12 @@ fn main() { let mut boxed_trait: Box = Box::new(OffscreenConsole::new(20, 20)); - root.set_default_background(colors::DARKEST_GREEN); + root.set_default_background(Color::DARKEST_GREEN); - direct.set_default_background(colors::RED); - boxed_direct.set_default_background(colors::WHITE); - trait_object.set_default_background(colors::BLACK); - boxed_trait.set_default_background(colors::BLUE); + direct.set_default_background(Color::RED); + boxed_direct.set_default_background(Color::WHITE); + trait_object.set_default_background(Color::BLACK); + boxed_trait.set_default_background(Color::BLUE); root.clear(); diff --git a/examples/colors.rs b/examples/colors.rs index 906862c3d..6b449647c 100644 --- a/examples/colors.rs +++ b/examples/colors.rs @@ -9,8 +9,8 @@ fn main() { .size(80, 50) .title("Using colours with libtcod") .init(); - con.set_default_background(colors::DARKEST_GREEN); - con.set_default_foreground(colors::LIGHTER_AZURE); + con.set_default_background(Color::DARKEST_GREEN); + con.set_default_foreground(Color::LIGHTER_AZURE); con.clear(); // Uses the default foreground and background: diff --git a/examples/samples.rs b/examples/samples.rs index 41db2cd3c..325a41086 100644 --- a/examples/samples.rs +++ b/examples/samples.rs @@ -133,7 +133,7 @@ impl ColorsSample { for x in 0..SAMPLE_SCREEN_WIDTH { for y in 0..SAMPLE_SCREEN_HEIGHT { let mut col = console.get_char_background(x, y); - col = colors::lerp(col, colors::BLACK, 0.5); + col = colors::lerp(col, Color::BLACK, 0.5); // use colored character 255 on first and last lines let c = if y == 0 || y == SAMPLE_SCREEN_HEIGHT-1 { '\u{00ff}' @@ -167,7 +167,7 @@ impl Render for ColorsSample { console.set_default_foreground(text_color); // the background behind the text is slightly darkened using the Multiply flag - console.set_default_background(colors::GREY); + console.set_default_background(Color::GREY); console.print_rect_ex(SAMPLE_SCREEN_WIDTH/2, 5, SAMPLE_SCREEN_WIDTH-2, SAMPLE_SCREEN_HEIGHT-1, BackgroundFlag::Multiply, TextAlignment::Center, "The Doryen library uses 24 bits colors, for both background and foreground."); @@ -291,7 +291,7 @@ fn seconds_from_duration(duration: Duration) -> f32 { impl Render for LineSample { fn initialize(&mut self, console: &mut Offscreen) { system::set_fps(30); - console.set_default_foreground(colors::WHITE); + console.set_default_foreground(Color::WHITE); } fn render(&mut self, @@ -331,7 +331,7 @@ impl Render for LineSample { let line = Line::new((xo, yo), (xd, yd)); for (x, y) in line { if x >= 0 && y >=0 && x < SAMPLE_SCREEN_WIDTH && y < SAMPLE_SCREEN_HEIGHT { - console.set_char_background(x, y, colors::LIGHT_BLUE, self.bk_flag); + console.set_char_background(x, y, Color::LIGHT_BLUE, self.bk_flag); } } @@ -490,13 +490,13 @@ impl NoiseSample { } fn draw_rectangle(&self, console: &mut Offscreen) { - console.set_default_background(colors::GREY); + console.set_default_background(Color::GREY); let height = if self.func as u32 <= NoiseType::Wavelet as u32 {10} else {13}; console.rect(2, 2, 23, height, false, BackgroundFlag::Multiply); for y in 2..(2+height) { for x in 2..25 { let old_col = console.get_char_foreground(x, y); - let color = old_col * colors::GREY; + let color = old_col * Color::GREY; console.set_char_foreground(x, y, color); } } @@ -505,17 +505,17 @@ impl NoiseSample { fn draw_menu(&self, console: &mut Offscreen) { for cur_func in NoiseFunction::iter() { if self.func == cur_func { - console.set_default_foreground(colors::WHITE); - console.set_default_background(colors::LIGHT_BLUE); + console.set_default_foreground(Color::WHITE); + console.set_default_background(Color::LIGHT_BLUE); console.print_ex(2, 2 + cur_func as i32, BackgroundFlag::Set, TextAlignment::Left, FUNC_NAMES[cur_func as usize]); } else { - console.set_default_foreground(colors::GREY); + console.set_default_foreground(Color::GREY); console.print(2, 2 + cur_func as i32, FUNC_NAMES[cur_func as usize]); } } - console.set_default_foreground(colors::WHITE); + console.set_default_foreground(Color::WHITE); console.print(2, 11, format!("Y/H : zoom({:2.1})", self.zoom)); if self.func > NoiseFunction::Wavelet { console.print(2, 12, format!("E/D : hurst ({:2.1})", self.hurst)); @@ -620,13 +620,13 @@ impl FovSample { } fn display_help(&self, console: &mut Offscreen) { - console.set_default_foreground(colors::WHITE); + console.set_default_foreground(Color::WHITE); console.print(1, 0, format!("IJKL : move around\nT : torch fx {}\nW : light walls {}\n+-: algo {:11?}", if self.torch { "on " } else { "off" }, if self.light_walls { "on " } else { "off" }, self.algorithm)); - console.set_default_foreground(colors::BLACK); + console.set_default_foreground(Color::BLACK); } fn display_map(&mut self, console: &mut Offscreen, dx: f32, dy: f32, di: f32) { @@ -933,7 +933,7 @@ impl<'a> Render for PathSample<'a> { // during the player movement, only the @ is redrawn. // the rest impacts only the background color // draw the help text & player @ - console.set_default_foreground(colors::WHITE); + console.set_default_foreground(Color::WHITE); console.put_char(self.dx, self.dy, '+', BackgroundFlag::None); console.put_char(self.px, self.py, '@', BackgroundFlag::None); console.print(1, 1, "IJKL / mouse :\nmove destination\nTAB : A*/dijkstra"); @@ -1212,7 +1212,7 @@ impl<'a> Render for BspSample<'a> { } console.clear(); - console.set_default_foreground(colors::WHITE); + console.set_default_foreground(Color::WHITE); console.print(1, 1, format!("ENTER : rebuild bsp\nSPACE : rebuild dungeon\n+-: bsp depth {}\n*/: room size {}\n1 : random room size {}", self.bsp_depth, self.min_room_size, @@ -1289,7 +1289,7 @@ impl ImageSample { blue: colors::Color::new(0, 0, 255), green: colors::Color::new(0, 255, 0), }; - i.img.set_key_color(colors::BLACK); + i.img.set_key_color(Color::BLACK); i } } @@ -1303,7 +1303,7 @@ impl Render for ImageSample { console: &mut Offscreen, _root: &Root, _event: Option<(EventFlags, Event)>) { - console.set_default_background(colors::BLACK); + console.set_default_background(Color::BLACK); console.clear(); let elapsed_seconds = seconds_from_duration(system::get_elapsed_time()); @@ -1319,7 +1319,7 @@ impl Render for ImageSample { if elapsed % 2 != 0 { // split the color channels of circle.png // the red channel - console.set_default_background(colors::RED); + console.set_default_background(Color::RED); console.rect(0, 3, 15, 15, false, BackgroundFlag::Set); image::blit_rect(&self.circle, (-1, -1), console, (0, 3), BackgroundFlag::Multiply); // the green channel @@ -1385,8 +1385,8 @@ impl MouseSample { impl Render for MouseSample { fn initialize(&mut self, console: &mut Offscreen) { system::set_fps(30); - console.set_default_background(colors::GREY); - console.set_default_foreground(colors::LIGHT_YELLOW); + console.set_default_background(Color::GREY); + console.set_default_foreground(Color::LIGHT_YELLOW); move_cursor(320, 200); show_cursor(true) } @@ -1458,9 +1458,9 @@ impl NameSample { } fn display_names(&self, console: &mut Offscreen) { - console.set_default_background(colors::LIGHT_BLUE); + console.set_default_background(Color::LIGHT_BLUE); console.clear(); - console.set_default_foreground(colors::WHITE); + console.set_default_foreground(Color::WHITE); console.print(1, 1, format!("{}\n\n+ : next generator\n- : prev generator", self.sets[self.cur_set])); for (i, name) in self.names.iter().enumerate() { @@ -1664,11 +1664,11 @@ fn main() { fn print_samples(root: &mut Root, cur_sample: usize, samples: &[MenuItem]) { for (i, sample) in samples.iter().enumerate() { if i == cur_sample { - root.set_default_foreground(colors::WHITE); - root.set_default_background(colors::LIGHT_BLUE); + root.set_default_foreground(Color::WHITE); + root.set_default_background(Color::LIGHT_BLUE); } else { - root.set_default_foreground(colors::GREY); - root.set_default_background(colors::BLACK); + root.set_default_foreground(Color::GREY); + root.set_default_background(Color::BLACK); } let y = 46 - (samples.len() - i); let fun = &sample.name; @@ -1678,7 +1678,7 @@ fn print_samples(root: &mut Root, cur_sample: usize, samples: &[MenuItem]) { } fn print_help_message(root: &mut Root) { - root.set_default_foreground(colors::GREY); + root.set_default_foreground(Color::GREY); root.print_ex(79, 46, BackgroundFlag::None, TextAlignment::Right, format!("last frame : {:3.0} ms ({:3} fps)", system::get_last_frame_length() * 1000.0, diff --git a/examples/shapes.rs b/examples/shapes.rs index 0a5f2e3cf..c7b5d5c9a 100644 --- a/examples/shapes.rs +++ b/examples/shapes.rs @@ -9,7 +9,7 @@ fn main() { .init(); while !root.window_closed() { - root.set_default_background(tcod::colors::BLACK); + root.set_default_background(Color::BLACK); root.clear(); diff --git a/src/colors.rs b/src/colors.rs index 7b9e37c65..581e5b7ff 100644 --- a/src/colors.rs +++ b/src/colors.rs @@ -27,6 +27,203 @@ impl FromNative for Color { } impl Color { + // NOTE; colour names and values copied from: + // tcod-sys/libtcod/include/libtcod_int.h + // + // We cannot return statics exported by the DLL here because they have a + // different type (TCOD_color_t) and we cannot call `transmute` to convert + // them to `Color`. + pub const BLACK: Color = Color{r: 0, g: 0, b: 0}; + pub const DARKEST_GREY: Color = Color{r: 31, g: 31, b: 31}; + pub const DARKER_GREY: Color = Color{r: 63, g: 63, b: 63}; + pub const DARK_GREY: Color = Color{r: 95, g: 95, b: 95}; + pub const GREY: Color = Color{r: 127, g: 127, b: 127}; + pub const LIGHT_GREY: Color = Color{r: 159, g: 159, b: 159}; + pub const LIGHTER_GREY: Color = Color{r: 191, g: 191, b: 191}; + pub const LIGHTEST_GREY: Color = Color{r: 223, g: 223, b: 223}; + pub const WHITE: Color = Color{r: 255, g: 255, b: 255}; + pub const DARKEST_SEPIA: Color = Color{r: 31, g: 24, b: 15}; + pub const DARKER_SEPIA: Color = Color{r: 63, g: 50, b: 31}; + pub const DARK_SEPIA: Color = Color{r: 94, g: 75, b: 47}; + pub const SEPIA: Color = Color{r: 127, g: 101, b: 63}; + pub const LIGHT_SEPIA: Color = Color{r: 158, g: 134, b: 100}; + pub const LIGHTER_SEPIA: Color = Color{r: 191, g: 171, b: 143}; + pub const LIGHTEST_SEPIA: Color = Color{r: 222, g: 211, b: 195}; + pub const DESATURATED_RED: Color = Color{r: 127, g: 63, b: 63}; + pub const DESATURATED_FLAME: Color = Color{r: 127, g: 79, b: 63}; + pub const DESATURATED_ORANGE: Color = Color{r: 127, g: 95, b: 63}; + pub const DESATURATED_AMBER: Color = Color{r: 127, g: 111, b: 63}; + pub const DESATURATED_YELLOW: Color = Color{r: 127, g: 127, b: 63}; + pub const DESATURATED_LIME: Color = Color{r: 111, g: 127, b: 63}; + pub const DESATURATED_CHARTREUSE: Color = Color{r: 95, g: 127, b: 63}; + pub const DESATURATED_GREEN: Color = Color{r: 63, g: 127, b: 63}; + pub const DESATURATED_SEA: Color = Color{r: 63, g: 127, b: 95}; + pub const DESATURATED_TURQUOISE: Color = Color{r: 63, g: 127, b: 111}; + pub const DESATURATED_CYAN: Color = Color{r: 63, g: 127, b: 127}; + pub const DESATURATED_SKY: Color = Color{r: 63, g: 111, b: 127}; + pub const DESATURATED_AZURE: Color = Color{r: 63, g: 95, b: 127}; + pub const DESATURATED_BLUE: Color = Color{r: 63, g: 63, b: 127}; + pub const DESATURATED_HAN: Color = Color{r: 79, g: 63, b: 127}; + pub const DESATURATED_VIOLET: Color = Color{r: 95, g: 63, b: 127}; + pub const DESATURATED_PURPLE: Color = Color{r: 111, g: 63, b: 127}; + pub const DESATURATED_FUCHSIA: Color = Color{r: 127, g: 63, b: 127}; + pub const DESATURATED_MAGENTA: Color = Color{r: 127, g: 63, b: 111}; + pub const DESATURATED_PINK: Color = Color{r: 127, g: 63, b: 95}; + pub const DESATURATED_CRIMSON: Color = Color{r: 127, g: 63, b: 79}; + pub const LIGHTEST_RED: Color = Color{r: 255, g: 191, b: 191}; + pub const LIGHTEST_FLAME: Color = Color{r: 255, g: 207, b: 191}; + pub const LIGHTEST_ORANGE: Color = Color{r: 255, g: 223, b: 191}; + pub const LIGHTEST_AMBER: Color = Color{r: 255, g: 239, b: 191}; + pub const LIGHTEST_YELLOW: Color = Color{r: 255, g: 255, b: 191}; + pub const LIGHTEST_LIME: Color = Color{r: 239, g: 255, b: 191}; + pub const LIGHTEST_CHARTREUSE: Color = Color{r: 223, g: 255, b: 191}; + pub const LIGHTEST_GREEN: Color = Color{r: 191, g: 255, b: 191}; + pub const LIGHTEST_SEA: Color = Color{r: 191, g: 255, b: 223}; + pub const LIGHTEST_TURQUOISE: Color = Color{r: 191, g: 255, b: 239}; + pub const LIGHTEST_CYAN: Color = Color{r: 191, g: 255, b: 255}; + pub const LIGHTEST_SKY: Color = Color{r: 191, g: 239, b: 255}; + pub const LIGHTEST_AZURE: Color = Color{r: 191, g: 223, b: 255}; + pub const LIGHTEST_BLUE: Color = Color{r: 191, g: 191, b: 255}; + pub const LIGHTEST_HAN: Color = Color{r: 207, g: 191, b: 255}; + pub const LIGHTEST_VIOLET: Color = Color{r: 223, g: 191, b: 255}; + pub const LIGHTEST_PURPLE: Color = Color{r: 239, g: 191, b: 255}; + pub const LIGHTEST_FUCHSIA: Color = Color{r: 255, g: 191, b: 255}; + pub const LIGHTEST_MAGENTA: Color = Color{r: 255, g: 191, b: 239}; + pub const LIGHTEST_PINK: Color = Color{r: 255, g: 191, b: 223}; + pub const LIGHTEST_CRIMSON: Color = Color{r: 255, g: 191, b: 207}; + pub const LIGHTER_RED: Color = Color{r: 255, g: 127, b: 127}; + pub const LIGHTER_FLAME: Color = Color{r: 255, g: 159, b: 127}; + pub const LIGHTER_ORANGE: Color = Color{r: 255, g: 191, b: 127}; + pub const LIGHTER_AMBER: Color = Color{r: 255, g: 223, b: 127}; + pub const LIGHTER_YELLOW: Color = Color{r: 255, g: 255, b: 127}; + pub const LIGHTER_LIME: Color = Color{r: 223, g: 255, b: 127}; + pub const LIGHTER_CHARTREUSE: Color = Color{r: 191, g: 255, b: 127}; + pub const LIGHTER_GREEN: Color = Color{r: 127, g: 255, b: 127}; + pub const LIGHTER_SEA: Color = Color{r: 127, g: 255, b: 191}; + pub const LIGHTER_TURQUOISE: Color = Color{r: 127, g: 255, b: 223}; + pub const LIGHTER_CYAN: Color = Color{r: 127, g: 255, b: 255}; + pub const LIGHTER_SKY: Color = Color{r: 127, g: 223, b: 255}; + pub const LIGHTER_AZURE: Color = Color{r: 127, g: 191, b: 255}; + pub const LIGHTER_BLUE: Color = Color{r: 127, g: 127, b: 255}; + pub const LIGHTER_HAN: Color = Color{r: 159, g: 127, b: 255}; + pub const LIGHTER_VIOLET: Color = Color{r: 191, g: 127, b: 255}; + pub const LIGHTER_PURPLE: Color = Color{r: 223, g: 127, b: 255}; + pub const LIGHTER_FUCHSIA: Color = Color{r: 255, g: 127, b: 255}; + pub const LIGHTER_MAGENTA: Color = Color{r: 255, g: 127, b: 223}; + pub const LIGHTER_PINK: Color = Color{r: 255, g: 127, b: 191}; + pub const LIGHTER_CRIMSON: Color = Color{r: 255, g: 127, b: 159}; + pub const LIGHT_RED: Color = Color{r: 255, g: 63, b: 63}; + pub const LIGHT_FLAME: Color = Color{r: 255, g: 111, b: 63}; + pub const LIGHT_ORANGE: Color = Color{r: 255, g: 159, b: 63}; + pub const LIGHT_AMBER: Color = Color{r: 255, g: 207, b: 63}; + pub const LIGHT_YELLOW: Color = Color{r: 255, g: 255, b: 63}; + pub const LIGHT_LIME: Color = Color{r: 207, g: 255, b: 63}; + pub const LIGHT_CHARTREUSE: Color = Color{r: 159, g: 255, b: 63}; + pub const LIGHT_GREEN: Color = Color{r: 63, g: 255, b: 63}; + pub const LIGHT_SEA: Color = Color{r: 63, g: 255, b: 159}; + pub const LIGHT_TURQUOISE: Color = Color{r: 63, g: 255, b: 207}; + pub const LIGHT_CYAN: Color = Color{r: 63, g: 255, b: 255}; + pub const LIGHT_SKY: Color = Color{r: 63, g: 207, b: 255}; + pub const LIGHT_AZURE: Color = Color{r: 63, g: 159, b: 255}; + pub const LIGHT_BLUE: Color = Color{r: 63, g: 63, b: 255}; + pub const LIGHT_HAN: Color = Color{r: 111, g: 63, b: 255}; + pub const LIGHT_VIOLET: Color = Color{r: 159, g: 63, b: 255}; + pub const LIGHT_PURPLE: Color = Color{r: 207, g: 63, b: 255}; + pub const LIGHT_FUCHSIA: Color = Color{r: 255, g: 63, b: 255}; + pub const LIGHT_MAGENTA: Color = Color{r: 255, g: 63, b: 207}; + pub const LIGHT_PINK: Color = Color{r: 255, g: 63, b: 159}; + pub const LIGHT_CRIMSON: Color = Color{r: 255, g: 63, b: 111}; + pub const RED: Color = Color{r: 255, g: 0, b: 0}; + pub const FLAME: Color = Color{r: 255, g: 63, b: 0}; + pub const ORANGE: Color = Color{r: 255, g: 127, b: 0}; + pub const AMBER: Color = Color{r: 255, g: 191, b: 0}; + pub const YELLOW: Color = Color{r: 255, g: 255, b: 0}; + pub const LIME: Color = Color{r: 191, g: 255, b: 0}; + pub const CHARTREUSE: Color = Color{r: 127, g: 255, b: 0}; + pub const GREEN: Color = Color{r: 0, g: 255, b: 0}; + pub const SEA: Color = Color{r: 0, g: 255, b: 127}; + pub const TURQUOISE: Color = Color{r: 0, g: 255, b: 191}; + pub const CYAN: Color = Color{r: 0, g: 255, b: 255}; + pub const SKY: Color = Color{r: 0, g: 191, b: 255}; + pub const AZURE: Color = Color{r: 0, g: 127, b: 255}; + pub const BLUE: Color = Color{r: 0, g: 0, b: 255}; + pub const HAN: Color = Color{r: 63, g: 0, b: 255}; + pub const VIOLET: Color = Color{r: 127, g: 0, b: 255}; + pub const PURPLE: Color = Color{r: 191, g: 0, b: 255}; + pub const FUCHSIA: Color = Color{r: 255, g: 0, b: 255}; + pub const MAGENTA: Color = Color{r: 255, g: 0, b: 191}; + pub const PINK: Color = Color{r: 255, g: 0, b: 127}; + pub const CRIMSON: Color = Color{r: 255, g: 0, b: 63}; + pub const DARK_RED: Color = Color{r: 191, g: 0, b: 0}; + pub const DARK_FLAME: Color = Color{r: 191, g: 47, b: 0}; + pub const DARK_ORANGE: Color = Color{r: 191, g: 95, b: 0}; + pub const DARK_AMBER: Color = Color{r: 191, g: 143, b: 0}; + pub const DARK_YELLOW: Color = Color{r: 191, g: 191, b: 0}; + pub const DARK_LIME: Color = Color{r: 143, g: 191, b: 0}; + pub const DARK_CHARTREUSE: Color = Color{r: 95, g: 191, b: 0}; + pub const DARK_GREEN: Color = Color{r: 0, g: 191, b: 0}; + pub const DARK_SEA: Color = Color{r: 0, g: 191, b: 95}; + pub const DARK_TURQUOISE: Color = Color{r: 0, g: 191, b: 143}; + pub const DARK_CYAN: Color = Color{r: 0, g: 191, b: 191}; + pub const DARK_SKY: Color = Color{r: 0, g: 143, b: 191}; + pub const DARK_AZURE: Color = Color{r: 0, g: 95, b: 191}; + pub const DARK_BLUE: Color = Color{r: 0, g: 0, b: 191}; + pub const DARK_HAN: Color = Color{r: 47, g: 0, b: 191}; + pub const DARK_VIOLET: Color = Color{r: 95, g: 0, b: 191}; + pub const DARK_PURPLE: Color = Color{r: 143, g: 0, b: 191}; + pub const DARK_FUCHSIA: Color = Color{r: 191, g: 0, b: 191}; + pub const DARK_MAGENTA: Color = Color{r: 191, g: 0, b: 143}; + pub const DARK_PINK: Color = Color{r: 191, g: 0, b: 95}; + pub const DARK_CRIMSON: Color = Color{r: 191, g: 0, b: 47}; + pub const DARKER_RED: Color = Color{r: 127, g: 0, b: 0}; + pub const DARKER_FLAME: Color = Color{r: 127, g: 31, b: 0}; + pub const DARKER_ORANGE: Color = Color{r: 127, g: 63, b: 0}; + pub const DARKER_AMBER: Color = Color{r: 127, g: 95, b: 0}; + pub const DARKER_YELLOW: Color = Color{r: 127, g: 127, b: 0}; + pub const DARKER_LIME: Color = Color{r: 95, g: 127, b: 0}; + pub const DARKER_CHARTREUSE: Color = Color{r: 63, g: 127, b: 0}; + pub const DARKER_GREEN: Color = Color{r: 0, g: 127, b: 0}; + pub const DARKER_SEA: Color = Color{r: 0, g: 127, b: 63}; + pub const DARKER_TURQUOISE: Color = Color{r: 0, g: 127, b: 95}; + pub const DARKER_CYAN: Color = Color{r: 0, g: 127, b: 127}; + pub const DARKER_SKY: Color = Color{r: 0, g: 95, b: 127}; + pub const DARKER_AZURE: Color = Color{r: 0, g: 63, b: 127}; + pub const DARKER_BLUE: Color = Color{r: 0, g: 0, b: 127}; + pub const DARKER_HAN: Color = Color{r: 31, g: 0, b: 127}; + pub const DARKER_VIOLET: Color = Color{r: 63, g: 0, b: 127}; + pub const DARKER_PURPLE: Color = Color{r: 95, g: 0, b: 127}; + pub const DARKER_FUCHSIA: Color = Color{r: 127, g: 0, b: 127}; + pub const DARKER_MAGENTA: Color = Color{r: 127, g: 0, b: 95}; + pub const DARKER_PINK: Color = Color{r: 127, g: 0, b: 63}; + pub const DARKER_CRIMSON: Color = Color{r: 127, g: 0, b: 31}; + pub const DARKEST_RED: Color = Color{r: 63, g: 0, b: 0}; + pub const DARKEST_FLAME: Color = Color{r: 63, g: 15, b: 0}; + pub const DARKEST_ORANGE: Color = Color{r: 63, g: 31, b: 0}; + pub const DARKEST_AMBER: Color = Color{r: 63, g: 47, b: 0}; + pub const DARKEST_YELLOW: Color = Color{r: 63, g: 63, b: 0}; + pub const DARKEST_LIME: Color = Color{r: 47, g: 63, b: 0}; + pub const DARKEST_CHARTREUSE: Color = Color{r: 31, g: 63, b: 0}; + pub const DARKEST_GREEN: Color = Color{r: 0, g: 63, b: 0}; + pub const DARKEST_SEA: Color = Color{r: 0, g: 63, b: 31}; + pub const DARKEST_TURQUOISE: Color = Color{r: 0, g: 63, b: 47}; + pub const DARKEST_CYAN: Color = Color{r: 0, g: 63, b: 63}; + pub const DARKEST_SKY: Color = Color{r: 0, g: 47, b: 63}; + pub const DARKEST_AZURE: Color = Color{r: 0, g: 31, b: 63}; + pub const DARKEST_BLUE: Color = Color{r: 0, g: 0, b: 63}; + pub const DARKEST_HAN: Color = Color{r: 15, g: 0, b: 63}; + pub const DARKEST_VIOLET: Color = Color{r: 31, g: 0, b: 63}; + pub const DARKEST_PURPLE: Color = Color{r: 47, g: 0, b: 63}; + pub const DARKEST_FUCHSIA: Color = Color{r: 63, g: 0, b: 63}; + pub const DARKEST_MAGENTA: Color = Color{r: 63, g: 0, b: 47}; + pub const DARKEST_PINK: Color = Color{r: 63, g: 0, b: 31}; + pub const DARKEST_CRIMSON: Color = Color{r: 63, g: 0, b: 15}; + pub const BRASS: Color = Color{r: 191, g: 151, b: 96}; + pub const COPPER: Color = Color{r: 197, g: 136, b: 124}; + pub const GOLD: Color = Color{r: 229, g: 191, b: 0}; + pub const SILVER: Color = Color{r: 203, g: 203, b: 203}; + pub const CELADON: Color = Color{r: 172, g: 255, b: 175}; + pub const PEACH: Color = Color{r: 255, g: 159, b: 127}; + pub const fn new(r: u8, g: u8, b: u8) -> Color { Color { r, g, b } } @@ -144,196 +341,196 @@ impl Div for Color { // We cannot return statics exported by the DLL here because they have a // different type (TCOD_color_t) and we cannot call `transmute` to convert // them to `Color`. -pub const BLACK: Color = Color{r: 0, g: 0, b: 0}; -pub const DARKEST_GREY: Color = Color{r: 31, g: 31, b: 31}; -pub const DARKER_GREY: Color = Color{r: 63, g: 63, b: 63}; -pub const DARK_GREY: Color = Color{r: 95, g: 95, b: 95}; -pub const GREY: Color = Color{r: 127, g: 127, b: 127}; -pub const LIGHT_GREY: Color = Color{r: 159, g: 159, b: 159}; -pub const LIGHTER_GREY: Color = Color{r: 191, g: 191, b: 191}; -pub const LIGHTEST_GREY: Color = Color{r: 223, g: 223, b: 223}; -pub const WHITE: Color = Color{r: 255, g: 255, b: 255}; -pub const DARKEST_SEPIA: Color = Color{r: 31, g: 24, b: 15}; -pub const DARKER_SEPIA: Color = Color{r: 63, g: 50, b: 31}; -pub const DARK_SEPIA: Color = Color{r: 94, g: 75, b: 47}; -pub const SEPIA: Color = Color{r: 127, g: 101, b: 63}; -pub const LIGHT_SEPIA: Color = Color{r: 158, g: 134, b: 100}; -pub const LIGHTER_SEPIA: Color = Color{r: 191, g: 171, b: 143}; -pub const LIGHTEST_SEPIA: Color = Color{r: 222, g: 211, b: 195}; -pub const DESATURATED_RED: Color = Color{r: 127, g: 63, b: 63}; -pub const DESATURATED_FLAME: Color = Color{r: 127, g: 79, b: 63}; -pub const DESATURATED_ORANGE: Color = Color{r: 127, g: 95, b: 63}; -pub const DESATURATED_AMBER: Color = Color{r: 127, g: 111, b: 63}; -pub const DESATURATED_YELLOW: Color = Color{r: 127, g: 127, b: 63}; -pub const DESATURATED_LIME: Color = Color{r: 111, g: 127, b: 63}; -pub const DESATURATED_CHARTREUSE: Color = Color{r: 95, g: 127, b: 63}; -pub const DESATURATED_GREEN: Color = Color{r: 63, g: 127, b: 63}; -pub const DESATURATED_SEA: Color = Color{r: 63, g: 127, b: 95}; -pub const DESATURATED_TURQUOISE: Color = Color{r: 63, g: 127, b: 111}; -pub const DESATURATED_CYAN: Color = Color{r: 63, g: 127, b: 127}; -pub const DESATURATED_SKY: Color = Color{r: 63, g: 111, b: 127}; -pub const DESATURATED_AZURE: Color = Color{r: 63, g: 95, b: 127}; -pub const DESATURATED_BLUE: Color = Color{r: 63, g: 63, b: 127}; -pub const DESATURATED_HAN: Color = Color{r: 79, g: 63, b: 127}; -pub const DESATURATED_VIOLET: Color = Color{r: 95, g: 63, b: 127}; -pub const DESATURATED_PURPLE: Color = Color{r: 111, g: 63, b: 127}; -pub const DESATURATED_FUCHSIA: Color = Color{r: 127, g: 63, b: 127}; -pub const DESATURATED_MAGENTA: Color = Color{r: 127, g: 63, b: 111}; -pub const DESATURATED_PINK: Color = Color{r: 127, g: 63, b: 95}; -pub const DESATURATED_CRIMSON: Color = Color{r: 127, g: 63, b: 79}; -pub const LIGHTEST_RED: Color = Color{r: 255, g: 191, b: 191}; -pub const LIGHTEST_FLAME: Color = Color{r: 255, g: 207, b: 191}; -pub const LIGHTEST_ORANGE: Color = Color{r: 255, g: 223, b: 191}; -pub const LIGHTEST_AMBER: Color = Color{r: 255, g: 239, b: 191}; -pub const LIGHTEST_YELLOW: Color = Color{r: 255, g: 255, b: 191}; -pub const LIGHTEST_LIME: Color = Color{r: 239, g: 255, b: 191}; -pub const LIGHTEST_CHARTREUSE: Color = Color{r: 223, g: 255, b: 191}; -pub const LIGHTEST_GREEN: Color = Color{r: 191, g: 255, b: 191}; -pub const LIGHTEST_SEA: Color = Color{r: 191, g: 255, b: 223}; -pub const LIGHTEST_TURQUOISE: Color = Color{r: 191, g: 255, b: 239}; -pub const LIGHTEST_CYAN: Color = Color{r: 191, g: 255, b: 255}; -pub const LIGHTEST_SKY: Color = Color{r: 191, g: 239, b: 255}; -pub const LIGHTEST_AZURE: Color = Color{r: 191, g: 223, b: 255}; -pub const LIGHTEST_BLUE: Color = Color{r: 191, g: 191, b: 255}; -pub const LIGHTEST_HAN: Color = Color{r: 207, g: 191, b: 255}; -pub const LIGHTEST_VIOLET: Color = Color{r: 223, g: 191, b: 255}; -pub const LIGHTEST_PURPLE: Color = Color{r: 239, g: 191, b: 255}; -pub const LIGHTEST_FUCHSIA: Color = Color{r: 255, g: 191, b: 255}; -pub const LIGHTEST_MAGENTA: Color = Color{r: 255, g: 191, b: 239}; -pub const LIGHTEST_PINK: Color = Color{r: 255, g: 191, b: 223}; -pub const LIGHTEST_CRIMSON: Color = Color{r: 255, g: 191, b: 207}; -pub const LIGHTER_RED: Color = Color{r: 255, g: 127, b: 127}; -pub const LIGHTER_FLAME: Color = Color{r: 255, g: 159, b: 127}; -pub const LIGHTER_ORANGE: Color = Color{r: 255, g: 191, b: 127}; -pub const LIGHTER_AMBER: Color = Color{r: 255, g: 223, b: 127}; -pub const LIGHTER_YELLOW: Color = Color{r: 255, g: 255, b: 127}; -pub const LIGHTER_LIME: Color = Color{r: 223, g: 255, b: 127}; -pub const LIGHTER_CHARTREUSE: Color = Color{r: 191, g: 255, b: 127}; -pub const LIGHTER_GREEN: Color = Color{r: 127, g: 255, b: 127}; -pub const LIGHTER_SEA: Color = Color{r: 127, g: 255, b: 191}; -pub const LIGHTER_TURQUOISE: Color = Color{r: 127, g: 255, b: 223}; -pub const LIGHTER_CYAN: Color = Color{r: 127, g: 255, b: 255}; -pub const LIGHTER_SKY: Color = Color{r: 127, g: 223, b: 255}; -pub const LIGHTER_AZURE: Color = Color{r: 127, g: 191, b: 255}; -pub const LIGHTER_BLUE: Color = Color{r: 127, g: 127, b: 255}; -pub const LIGHTER_HAN: Color = Color{r: 159, g: 127, b: 255}; -pub const LIGHTER_VIOLET: Color = Color{r: 191, g: 127, b: 255}; -pub const LIGHTER_PURPLE: Color = Color{r: 223, g: 127, b: 255}; -pub const LIGHTER_FUCHSIA: Color = Color{r: 255, g: 127, b: 255}; -pub const LIGHTER_MAGENTA: Color = Color{r: 255, g: 127, b: 223}; -pub const LIGHTER_PINK: Color = Color{r: 255, g: 127, b: 191}; -pub const LIGHTER_CRIMSON: Color = Color{r: 255, g: 127, b: 159}; -pub const LIGHT_RED: Color = Color{r: 255, g: 63, b: 63}; -pub const LIGHT_FLAME: Color = Color{r: 255, g: 111, b: 63}; -pub const LIGHT_ORANGE: Color = Color{r: 255, g: 159, b: 63}; -pub const LIGHT_AMBER: Color = Color{r: 255, g: 207, b: 63}; -pub const LIGHT_YELLOW: Color = Color{r: 255, g: 255, b: 63}; -pub const LIGHT_LIME: Color = Color{r: 207, g: 255, b: 63}; -pub const LIGHT_CHARTREUSE: Color = Color{r: 159, g: 255, b: 63}; -pub const LIGHT_GREEN: Color = Color{r: 63, g: 255, b: 63}; -pub const LIGHT_SEA: Color = Color{r: 63, g: 255, b: 159}; -pub const LIGHT_TURQUOISE: Color = Color{r: 63, g: 255, b: 207}; -pub const LIGHT_CYAN: Color = Color{r: 63, g: 255, b: 255}; -pub const LIGHT_SKY: Color = Color{r: 63, g: 207, b: 255}; -pub const LIGHT_AZURE: Color = Color{r: 63, g: 159, b: 255}; -pub const LIGHT_BLUE: Color = Color{r: 63, g: 63, b: 255}; -pub const LIGHT_HAN: Color = Color{r: 111, g: 63, b: 255}; -pub const LIGHT_VIOLET: Color = Color{r: 159, g: 63, b: 255}; -pub const LIGHT_PURPLE: Color = Color{r: 207, g: 63, b: 255}; -pub const LIGHT_FUCHSIA: Color = Color{r: 255, g: 63, b: 255}; -pub const LIGHT_MAGENTA: Color = Color{r: 255, g: 63, b: 207}; -pub const LIGHT_PINK: Color = Color{r: 255, g: 63, b: 159}; -pub const LIGHT_CRIMSON: Color = Color{r: 255, g: 63, b: 111}; -pub const RED: Color = Color{r: 255, g: 0, b: 0}; -pub const FLAME: Color = Color{r: 255, g: 63, b: 0}; -pub const ORANGE: Color = Color{r: 255, g: 127, b: 0}; -pub const AMBER: Color = Color{r: 255, g: 191, b: 0}; -pub const YELLOW: Color = Color{r: 255, g: 255, b: 0}; -pub const LIME: Color = Color{r: 191, g: 255, b: 0}; -pub const CHARTREUSE: Color = Color{r: 127, g: 255, b: 0}; -pub const GREEN: Color = Color{r: 0, g: 255, b: 0}; -pub const SEA: Color = Color{r: 0, g: 255, b: 127}; -pub const TURQUOISE: Color = Color{r: 0, g: 255, b: 191}; -pub const CYAN: Color = Color{r: 0, g: 255, b: 255}; -pub const SKY: Color = Color{r: 0, g: 191, b: 255}; -pub const AZURE: Color = Color{r: 0, g: 127, b: 255}; -pub const BLUE: Color = Color{r: 0, g: 0, b: 255}; -pub const HAN: Color = Color{r: 63, g: 0, b: 255}; -pub const VIOLET: Color = Color{r: 127, g: 0, b: 255}; -pub const PURPLE: Color = Color{r: 191, g: 0, b: 255}; -pub const FUCHSIA: Color = Color{r: 255, g: 0, b: 255}; -pub const MAGENTA: Color = Color{r: 255, g: 0, b: 191}; -pub const PINK: Color = Color{r: 255, g: 0, b: 127}; -pub const CRIMSON: Color = Color{r: 255, g: 0, b: 63}; -pub const DARK_RED: Color = Color{r: 191, g: 0, b: 0}; -pub const DARK_FLAME: Color = Color{r: 191, g: 47, b: 0}; -pub const DARK_ORANGE: Color = Color{r: 191, g: 95, b: 0}; -pub const DARK_AMBER: Color = Color{r: 191, g: 143, b: 0}; -pub const DARK_YELLOW: Color = Color{r: 191, g: 191, b: 0}; -pub const DARK_LIME: Color = Color{r: 143, g: 191, b: 0}; -pub const DARK_CHARTREUSE: Color = Color{r: 95, g: 191, b: 0}; -pub const DARK_GREEN: Color = Color{r: 0, g: 191, b: 0}; -pub const DARK_SEA: Color = Color{r: 0, g: 191, b: 95}; -pub const DARK_TURQUOISE: Color = Color{r: 0, g: 191, b: 143}; -pub const DARK_CYAN: Color = Color{r: 0, g: 191, b: 191}; -pub const DARK_SKY: Color = Color{r: 0, g: 143, b: 191}; -pub const DARK_AZURE: Color = Color{r: 0, g: 95, b: 191}; -pub const DARK_BLUE: Color = Color{r: 0, g: 0, b: 191}; -pub const DARK_HAN: Color = Color{r: 47, g: 0, b: 191}; -pub const DARK_VIOLET: Color = Color{r: 95, g: 0, b: 191}; -pub const DARK_PURPLE: Color = Color{r: 143, g: 0, b: 191}; -pub const DARK_FUCHSIA: Color = Color{r: 191, g: 0, b: 191}; -pub const DARK_MAGENTA: Color = Color{r: 191, g: 0, b: 143}; -pub const DARK_PINK: Color = Color{r: 191, g: 0, b: 95}; -pub const DARK_CRIMSON: Color = Color{r: 191, g: 0, b: 47}; -pub const DARKER_RED: Color = Color{r: 127, g: 0, b: 0}; -pub const DARKER_FLAME: Color = Color{r: 127, g: 31, b: 0}; -pub const DARKER_ORANGE: Color = Color{r: 127, g: 63, b: 0}; -pub const DARKER_AMBER: Color = Color{r: 127, g: 95, b: 0}; -pub const DARKER_YELLOW: Color = Color{r: 127, g: 127, b: 0}; -pub const DARKER_LIME: Color = Color{r: 95, g: 127, b: 0}; -pub const DARKER_CHARTREUSE: Color = Color{r: 63, g: 127, b: 0}; -pub const DARKER_GREEN: Color = Color{r: 0, g: 127, b: 0}; -pub const DARKER_SEA: Color = Color{r: 0, g: 127, b: 63}; -pub const DARKER_TURQUOISE: Color = Color{r: 0, g: 127, b: 95}; -pub const DARKER_CYAN: Color = Color{r: 0, g: 127, b: 127}; -pub const DARKER_SKY: Color = Color{r: 0, g: 95, b: 127}; -pub const DARKER_AZURE: Color = Color{r: 0, g: 63, b: 127}; -pub const DARKER_BLUE: Color = Color{r: 0, g: 0, b: 127}; -pub const DARKER_HAN: Color = Color{r: 31, g: 0, b: 127}; -pub const DARKER_VIOLET: Color = Color{r: 63, g: 0, b: 127}; -pub const DARKER_PURPLE: Color = Color{r: 95, g: 0, b: 127}; -pub const DARKER_FUCHSIA: Color = Color{r: 127, g: 0, b: 127}; -pub const DARKER_MAGENTA: Color = Color{r: 127, g: 0, b: 95}; -pub const DARKER_PINK: Color = Color{r: 127, g: 0, b: 63}; -pub const DARKER_CRIMSON: Color = Color{r: 127, g: 0, b: 31}; -pub const DARKEST_RED: Color = Color{r: 63, g: 0, b: 0}; -pub const DARKEST_FLAME: Color = Color{r: 63, g: 15, b: 0}; -pub const DARKEST_ORANGE: Color = Color{r: 63, g: 31, b: 0}; -pub const DARKEST_AMBER: Color = Color{r: 63, g: 47, b: 0}; -pub const DARKEST_YELLOW: Color = Color{r: 63, g: 63, b: 0}; -pub const DARKEST_LIME: Color = Color{r: 47, g: 63, b: 0}; -pub const DARKEST_CHARTREUSE: Color = Color{r: 31, g: 63, b: 0}; -pub const DARKEST_GREEN: Color = Color{r: 0, g: 63, b: 0}; -pub const DARKEST_SEA: Color = Color{r: 0, g: 63, b: 31}; -pub const DARKEST_TURQUOISE: Color = Color{r: 0, g: 63, b: 47}; -pub const DARKEST_CYAN: Color = Color{r: 0, g: 63, b: 63}; -pub const DARKEST_SKY: Color = Color{r: 0, g: 47, b: 63}; -pub const DARKEST_AZURE: Color = Color{r: 0, g: 31, b: 63}; -pub const DARKEST_BLUE: Color = Color{r: 0, g: 0, b: 63}; -pub const DARKEST_HAN: Color = Color{r: 15, g: 0, b: 63}; -pub const DARKEST_VIOLET: Color = Color{r: 31, g: 0, b: 63}; -pub const DARKEST_PURPLE: Color = Color{r: 47, g: 0, b: 63}; -pub const DARKEST_FUCHSIA: Color = Color{r: 63, g: 0, b: 63}; -pub const DARKEST_MAGENTA: Color = Color{r: 63, g: 0, b: 47}; -pub const DARKEST_PINK: Color = Color{r: 63, g: 0, b: 31}; -pub const DARKEST_CRIMSON: Color = Color{r: 63, g: 0, b: 15}; -pub const BRASS: Color = Color{r: 191, g: 151, b: 96}; -pub const COPPER: Color = Color{r: 197, g: 136, b: 124}; -pub const GOLD: Color = Color{r: 229, g: 191, b: 0}; -pub const SILVER: Color = Color{r: 203, g: 203, b: 203}; -pub const CELADON: Color = Color{r: 172, g: 255, b: 175}; -pub const PEACH: Color = Color{r: 255, g: 159, b: 127}; +pub const BLACK: Color = Color::BLACK; +pub const DARKEST_GREY: Color = Color::DARKEST_GREY; +pub const DARKER_GREY: Color = Color::DARKER_GREY; +pub const DARK_GREY: Color = Color::DARK_GREY; +pub const GREY: Color = Color::GREY; +pub const LIGHT_GREY: Color = Color::LIGHT_GREY; +pub const LIGHTER_GREY: Color = Color::LIGHTER_GREY; +pub const LIGHTEST_GREY: Color = Color::LIGHTEST_GREY; +pub const WHITE: Color = Color::WHITE; +pub const DARKEST_SEPIA: Color = Color::DARKEST_SEPIA; +pub const DARKER_SEPIA: Color = Color::DARKER_SEPIA; +pub const DARK_SEPIA: Color = Color::DARK_SEPIA; +pub const SEPIA: Color = Color::SEPIA; +pub const LIGHT_SEPIA: Color = Color::LIGHT_SEPIA; +pub const LIGHTER_SEPIA: Color = Color::LIGHTER_SEPIA; +pub const LIGHTEST_SEPIA: Color = Color::LIGHTEST_SEPIA; +pub const DESATURATED_RED: Color = Color::DESATURATED_RED; +pub const DESATURATED_FLAME: Color = Color::DESATURATED_FLAME; +pub const DESATURATED_ORANGE: Color = Color::DESATURATED_ORANGE; +pub const DESATURATED_AMBER: Color = Color::DESATURATED_AMBER; +pub const DESATURATED_YELLOW: Color = Color::DESATURATED_YELLOW; +pub const DESATURATED_LIME: Color = Color::DESATURATED_LIME; +pub const DESATURATED_CHARTREUSE: Color = Color::DESATURATED_CHARTREUSE; +pub const DESATURATED_GREEN: Color = Color::DESATURATED_GREEN; +pub const DESATURATED_SEA: Color = Color::DESATURATED_SEA; +pub const DESATURATED_TURQUOISE: Color = Color::DESATURATED_TURQUOISE; +pub const DESATURATED_CYAN: Color = Color::DESATURATED_CYAN; +pub const DESATURATED_SKY: Color = Color::DESATURATED_SKY; +pub const DESATURATED_AZURE: Color = Color::DESATURATED_AZURE; +pub const DESATURATED_BLUE: Color = Color::DESATURATED_BLUE; +pub const DESATURATED_HAN: Color = Color::DESATURATED_HAN; +pub const DESATURATED_VIOLET: Color = Color::DESATURATED_VIOLET; +pub const DESATURATED_PURPLE: Color = Color::DESATURATED_PURPLE; +pub const DESATURATED_FUCHSIA: Color = Color::DESATURATED_FUCHSIA; +pub const DESATURATED_MAGENTA: Color = Color::DESATURATED_MAGENTA; +pub const DESATURATED_PINK: Color = Color::DESATURATED_PINK; +pub const DESATURATED_CRIMSON: Color = Color::DESATURATED_CRIMSON; +pub const LIGHTEST_RED: Color = Color::LIGHTEST_RED; +pub const LIGHTEST_FLAME: Color = Color::LIGHTEST_FLAME; +pub const LIGHTEST_ORANGE: Color = Color::LIGHTEST_ORANGE; +pub const LIGHTEST_AMBER: Color = Color::LIGHTEST_AMBER; +pub const LIGHTEST_YELLOW: Color = Color::LIGHTEST_YELLOW; +pub const LIGHTEST_LIME: Color = Color::LIGHTEST_LIME; +pub const LIGHTEST_CHARTREUSE: Color = Color::LIGHTEST_CHARTREUSE; +pub const LIGHTEST_GREEN: Color = Color::LIGHTEST_GREEN; +pub const LIGHTEST_SEA: Color = Color::LIGHTEST_SEA; +pub const LIGHTEST_TURQUOISE: Color = Color::LIGHTEST_TURQUOISE; +pub const LIGHTEST_CYAN: Color = Color::LIGHTEST_CYAN; +pub const LIGHTEST_SKY: Color = Color::LIGHTEST_SKY; +pub const LIGHTEST_AZURE: Color = Color::LIGHTEST_AZURE; +pub const LIGHTEST_BLUE: Color = Color::LIGHTEST_BLUE; +pub const LIGHTEST_HAN: Color = Color::LIGHTEST_HAN; +pub const LIGHTEST_VIOLET: Color = Color::LIGHTEST_VIOLET; +pub const LIGHTEST_PURPLE: Color = Color::LIGHTEST_PURPLE; +pub const LIGHTEST_FUCHSIA: Color = Color::LIGHTEST_FUCHSIA; +pub const LIGHTEST_MAGENTA: Color = Color::LIGHTEST_MAGENTA; +pub const LIGHTEST_PINK: Color = Color::LIGHTEST_PINK; +pub const LIGHTEST_CRIMSON: Color = Color::LIGHTEST_CRIMSON; +pub const LIGHTER_RED: Color = Color::LIGHTER_RED; +pub const LIGHTER_FLAME: Color = Color::LIGHTER_FLAME; +pub const LIGHTER_ORANGE: Color = Color::LIGHTER_ORANGE; +pub const LIGHTER_AMBER: Color = Color::LIGHTER_AMBER; +pub const LIGHTER_YELLOW: Color = Color::LIGHTER_YELLOW; +pub const LIGHTER_LIME: Color = Color::LIGHTER_LIME; +pub const LIGHTER_CHARTREUSE: Color = Color::LIGHTER_CHARTREUSE; +pub const LIGHTER_GREEN: Color = Color::LIGHTER_GREEN; +pub const LIGHTER_SEA: Color = Color::LIGHTER_SEA; +pub const LIGHTER_TURQUOISE: Color = Color::LIGHTER_TURQUOISE; +pub const LIGHTER_CYAN: Color = Color::LIGHTER_CYAN; +pub const LIGHTER_SKY: Color = Color::LIGHTER_SKY; +pub const LIGHTER_AZURE: Color = Color::LIGHTER_AZURE; +pub const LIGHTER_BLUE: Color = Color::LIGHTER_BLUE; +pub const LIGHTER_HAN: Color = Color::LIGHTER_HAN; +pub const LIGHTER_VIOLET: Color = Color::LIGHTER_VIOLET; +pub const LIGHTER_PURPLE: Color = Color::LIGHTER_PURPLE; +pub const LIGHTER_FUCHSIA: Color = Color::LIGHTER_FUCHSIA; +pub const LIGHTER_MAGENTA: Color = Color::LIGHTER_MAGENTA; +pub const LIGHTER_PINK: Color = Color::LIGHTER_PINK; +pub const LIGHTER_CRIMSON: Color = Color::LIGHTER_CRIMSON; +pub const LIGHT_RED: Color = Color::LIGHT_RED; +pub const LIGHT_FLAME: Color = Color::LIGHT_FLAME; +pub const LIGHT_ORANGE: Color = Color::LIGHT_ORANGE; +pub const LIGHT_AMBER: Color = Color::LIGHT_AMBER; +pub const LIGHT_YELLOW: Color = Color::LIGHT_YELLOW; +pub const LIGHT_LIME: Color = Color::LIGHT_LIME; +pub const LIGHT_CHARTREUSE: Color = Color::LIGHT_CHARTREUSE; +pub const LIGHT_GREEN: Color = Color::LIGHT_GREEN; +pub const LIGHT_SEA: Color = Color::LIGHT_SEA; +pub const LIGHT_TURQUOISE: Color = Color::LIGHT_TURQUOISE; +pub const LIGHT_CYAN: Color = Color::LIGHT_CYAN; +pub const LIGHT_SKY: Color = Color::LIGHT_SKY; +pub const LIGHT_AZURE: Color = Color::LIGHT_AZURE; +pub const LIGHT_BLUE: Color = Color::LIGHT_BLUE; +pub const LIGHT_HAN: Color = Color::LIGHT_HAN; +pub const LIGHT_VIOLET: Color = Color::LIGHT_VIOLET; +pub const LIGHT_PURPLE: Color = Color::LIGHT_PURPLE; +pub const LIGHT_FUCHSIA: Color = Color::LIGHT_FUCHSIA; +pub const LIGHT_MAGENTA: Color = Color::LIGHT_MAGENTA; +pub const LIGHT_PINK: Color = Color::LIGHT_PINK; +pub const LIGHT_CRIMSON: Color = Color::LIGHT_CRIMSON; +pub const RED: Color = Color::RED; +pub const FLAME: Color = Color::FLAME; +pub const ORANGE: Color = Color::ORANGE; +pub const AMBER: Color = Color::AMBER; +pub const YELLOW: Color = Color::YELLOW; +pub const LIME: Color = Color::LIME; +pub const CHARTREUSE: Color = Color::CHARTREUSE; +pub const GREEN: Color = Color::GREEN; +pub const SEA: Color = Color::SEA; +pub const TURQUOISE: Color = Color::TURQUOISE; +pub const CYAN: Color = Color::CYAN; +pub const SKY: Color = Color::SKY; +pub const AZURE: Color = Color::AZURE; +pub const BLUE: Color = Color::BLUE; +pub const HAN: Color = Color::HAN; +pub const VIOLET: Color = Color::VIOLET; +pub const PURPLE: Color = Color::PURPLE; +pub const FUCHSIA: Color = Color::FUCHSIA; +pub const MAGENTA: Color = Color::MAGENTA; +pub const PINK: Color = Color::PINK; +pub const CRIMSON: Color = Color::CRIMSON; +pub const DARK_RED: Color = Color::DARK_RED; +pub const DARK_FLAME: Color = Color::DARK_FLAME; +pub const DARK_ORANGE: Color = Color::DARK_ORANGE; +pub const DARK_AMBER: Color = Color::DARK_AMBER; +pub const DARK_YELLOW: Color = Color::DARK_YELLOW; +pub const DARK_LIME: Color = Color::DARK_LIME; +pub const DARK_CHARTREUSE: Color = Color::DARK_CHARTREUSE; +pub const DARK_GREEN: Color = Color::DARK_GREEN; +pub const DARK_SEA: Color = Color::DARK_SEA; +pub const DARK_TURQUOISE: Color = Color::DARK_TURQUOISE; +pub const DARK_CYAN: Color = Color::DARK_CYAN; +pub const DARK_SKY: Color = Color::DARK_SKY; +pub const DARK_AZURE: Color = Color::DARK_AZURE; +pub const DARK_BLUE: Color = Color::DARK_BLUE; +pub const DARK_HAN: Color = Color::DARK_HAN; +pub const DARK_VIOLET: Color = Color::DARK_VIOLET; +pub const DARK_PURPLE: Color = Color::DARK_PURPLE; +pub const DARK_FUCHSIA: Color = Color::DARK_FUCHSIA; +pub const DARK_MAGENTA: Color = Color::DARK_MAGENTA; +pub const DARK_PINK: Color = Color::DARK_PINK; +pub const DARK_CRIMSON: Color = Color::DARK_CRIMSON; +pub const DARKER_RED: Color = Color::DARKER_RED; +pub const DARKER_FLAME: Color = Color::DARKER_FLAME; +pub const DARKER_ORANGE: Color = Color::DARKER_ORANGE; +pub const DARKER_AMBER: Color = Color::DARKER_AMBER; +pub const DARKER_YELLOW: Color = Color::DARKER_YELLOW; +pub const DARKER_LIME: Color = Color::DARKER_LIME; +pub const DARKER_CHARTREUSE: Color = Color::DARKER_CHARTREUSE; +pub const DARKER_GREEN: Color = Color::DARKER_GREEN; +pub const DARKER_SEA: Color = Color::DARKER_SEA; +pub const DARKER_TURQUOISE: Color = Color::DARKER_TURQUOISE; +pub const DARKER_CYAN: Color = Color::DARKER_CYAN; +pub const DARKER_SKY: Color = Color::DARKER_SKY; +pub const DARKER_AZURE: Color = Color::DARKER_AZURE; +pub const DARKER_BLUE: Color = Color::DARKER_BLUE; +pub const DARKER_HAN: Color = Color::DARKER_HAN; +pub const DARKER_VIOLET: Color = Color::DARKER_VIOLET; +pub const DARKER_PURPLE: Color = Color::DARKER_PURPLE; +pub const DARKER_FUCHSIA: Color = Color::DARKER_FUCHSIA; +pub const DARKER_MAGENTA: Color = Color::DARKER_MAGENTA; +pub const DARKER_PINK: Color = Color::DARKER_PINK; +pub const DARKER_CRIMSON: Color = Color::DARKER_CRIMSON; +pub const DARKEST_RED: Color = Color::DARKEST_RED; +pub const DARKEST_FLAME: Color = Color::DARKEST_FLAME; +pub const DARKEST_ORANGE: Color = Color::DARKEST_ORANGE; +pub const DARKEST_AMBER: Color = Color::DARKEST_AMBER; +pub const DARKEST_YELLOW: Color = Color::DARKEST_YELLOW; +pub const DARKEST_LIME: Color = Color::DARKEST_LIME; +pub const DARKEST_CHARTREUSE: Color = Color::DARKEST_CHARTREUSE; +pub const DARKEST_GREEN: Color = Color::DARKEST_GREEN; +pub const DARKEST_SEA: Color = Color::DARKEST_SEA; +pub const DARKEST_TURQUOISE: Color = Color::DARKEST_TURQUOISE; +pub const DARKEST_CYAN: Color = Color::DARKEST_CYAN; +pub const DARKEST_SKY: Color = Color::DARKEST_SKY; +pub const DARKEST_AZURE: Color = Color::DARKEST_AZURE; +pub const DARKEST_BLUE: Color = Color::DARKEST_BLUE; +pub const DARKEST_HAN: Color = Color::DARKEST_HAN; +pub const DARKEST_VIOLET: Color = Color::DARKEST_VIOLET; +pub const DARKEST_PURPLE: Color = Color::DARKEST_PURPLE; +pub const DARKEST_FUCHSIA: Color = Color::DARKEST_FUCHSIA; +pub const DARKEST_MAGENTA: Color = Color::DARKEST_MAGENTA; +pub const DARKEST_PINK: Color = Color::DARKEST_PINK; +pub const DARKEST_CRIMSON: Color = Color::DARKEST_CRIMSON; +pub const BRASS: Color = Color::BRASS; +pub const COPPER: Color = Color::COPPER; +pub const GOLD: Color = Color::GOLD; +pub const SILVER: Color = Color::SILVER; +pub const CELADON: Color = Color::CELADON; +pub const PEACH: Color = Color::PEACH; #[cfg(all(feature = "serialization", test))]