class

TUI::Color

Inherits Reference < Object

Anything that can render itself as the parameter portion of an SGR foreground/background escape (no leading "\e[3"/"\e[4" prefix, no trailing "m" — see #sgr_fg/#sgr_bg return shape on each subclass). Term never branches on a concrete Color subclass; it only ever calls these two methods, so adding a new color representation (e.g. 24-bit RGB) never requires touching Term or Style — just a new subclass and a new TUI.color overload.

Instance methods

sgr_bg
Source
sgr_fg
Source