Skip to main content

Module color256_theme

Module color256_theme 

Source
Expand description

Theme-aware 256-color helpers.

The terminal 256-color palette can be “non-harmonious” on light themes when palette semantics are intentionally flipped for compatibility. In that mode, cube/gray indices need to be reflected to keep visual intent stable.

Functions§

adjust_index_for_theme
Adjust an ANSI256 index based on a light/dark theme hint.
rgb_to_ansi256_for_theme
Convert RGB to ANSI256 and apply theme-aware palette adjustment.
set_harmonious_runtime_hint
Store a runtime harmony hint.