Skip to main content

Module style

Module style 

Source
Expand description

Style representation and terminal styling primitives.

Structs§

Ansi256Color
256 (8-bit) color support
Effects
A set of text effects
Reset
Reset terminal formatting
RgbColor
24-bit ANSI RGB color codes
Style
A terminal style defining text effects and foreground/background colors.

Enums§

AnsiColor
Available 4-bit ANSI color palette codes
Color
Any ANSI color code scheme

Functions§

ansi256_to_rgb
Convert an ANSI 256-color index to approximate (r, g, b) values.
rgb_to_ansi16
Convert an RGB color to the closest standard ANSI 16 color using Euclidean distance.
rgb_to_ansi256
Convert an RGB color to the closest index in the standard xterm 256-color palette.