Skip to main content

tinted_palette

Function tinted_palette 

pub fn tinted_palette(
    snapshot: &ConsolePaletteSnapshot,
    tint: CONSOLE_CHARACTER_ATTRIBUTES,
) -> [COLORREF; 16]
Expand description

Derive the tinted palette for a state color: the captured palette with the console’s default-foreground and default-background entries remapped to the colors the legacy tint attribute’s foreground and background nibbles select. Recoloring palette entries (never the per-cell attributes) leaves VT/24-bit cells - which store their color outside the palette - untouched, so the full configured color applies without hiding the child’s own colored output.

§Arguments

  • snapshot - The pristine palette captured by snapshot_console_palette.
  • tint - Legacy attribute whose foreground and background nibbles select the tint’s text and window colors.

§Returns

The palette to install for the tinted look.