module
TUI::Colors
Overview
xterm 256-color palette index math, returning RGB256 instances.
Defined in:
tui/core/colors.crClass Method Summary
-
.cube(r : Int32, g : Int32, b : Int32) : RGB256
6x6x6 RGB color cube (codes 16-231).
-
.gray(n : Int32) : RGB256
24-step grayscale ramp (codes 232-255), n is 0-23.
Class Method Detail
6x6x6 RGB color cube (codes 16-231). Each channel is 0-5; the standard xterm cube's component intensities are [0, 95, 135, 175, 215, 255].
24-step grayscale ramp (codes 232-255), n is 0-23. Excludes pure black/white — those are already codes 0/15 (NamedColor) and 16/231 (cube corners).