Skip to main content

retroglyph_window/
palette.rs

1//! Canonical default colors shared by the graphical backends.
2//!
3//! `retroglyph-core`'s [`Color::resolve_rgb`](retroglyph_core::color::Color::resolve_rgb) already
4//! resolves palette/RGB colors to `(r, g, b)`; what it can't supply is the value a
5//! [`Color::Default`](retroglyph_core::color::Color::Default) foreground/background should fall
6//! back to, which is a rendering-policy choice, not a core color-model one. Both graphical backends
7//! (`retroglyph-gl`, `retroglyph-software`) resolve `Color::Default` to the same pair, so it lives
8//! here once instead of being re-hardcoded (in two different representations) per backend, where it
9//! could silently drift.
10
11/// Foreground for [`Color::Default`](retroglyph_core::color::Color::Default): a light grey,
12/// matching a typical terminal's default text color.
13pub const DEFAULT_FG: (u8, u8, u8) = (0xD4, 0xD4, 0xD4);
14
15/// Background for [`Color::Default`](retroglyph_core::color::Color::Default): black.
16pub const DEFAULT_BG: (u8, u8, u8) = (0x00, 0x00, 0x00);