abstract class TUI::Color

Overview

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.

Direct Known Subclasses

Defined in:

tui/core/colors.cr

Instance Method Summary

Instance Method Detail

abstract def sgr_bg : String #

[View source]
abstract def sgr_fg : String #

[View source]