Expand description
Color and style types for character cells: Color (this module) and Style, a {fg, bg} pair of two Colors with no other relation to anything else in this crate.
Split into private submodules by concern, animate/backend/testing-style: ansi is the
16-color ANSI palette and the shared indexed/ANSI quantization machinery, convert is
Color’s inherent methods (constants, RGB resolution, gem color-space conversions),
named is Color’s string-name/hex constructors (from_named, from_hex), palette_oklab
is the generated Oklab table ansi quantizes against, parse is Color’s
Display/FromStr/serde impls, style is Style itself, and tint
is Tint, sprite colour modulation.
Structs§
- Invalid
Ansi Index - Error returned when a
u8value has no correspondingAnsiColor. - Parse
Color Error - Error returned when parsing a
Colorfrom a string fails. - Style
- A style consisting of foreground and background color.
Enums§
- Ansi
Color - Standard 16-color ANSI palette.
- Color
- Represents a color in the terminal grid.
- Quantize
- The distance metric
Color::to_indexed_withandColor::to_ansi_withuse to find a palette entry’s nearest neighbour. - Tint
- How a sprite’s own pixels are recoloured at draw time.