Terminality represents terminal colors as theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Rikitav/Terminality/llms.txt
Use this file to discover all available pages before exploring further.
Color scoped enum defined in terminality:Color. It covers the standard 16-color palette supported by every VT-100-compatible terminal: one transparent sentinel, eight standard colors (including two grays), and their eight bright counterparts. You use Color values when setting foreground and background properties on controls and when issuing SetFore / SetBack commands inside RenderOverride.
Color values
| Enumerator | Value | Description |
|---|---|---|
Color::TRANSPARENT | -1 | No color — inherits or leaves the cell color unchanged. |
Color::BLACK | 0 | Standard black. |
Color::DARK_BLUE | 1 | Standard dark blue. |
Color::DARK_GREEN | 2 | Standard dark green. |
Color::DARK_CYAN | 3 | Standard dark cyan. |
Color::DARK_RED | 4 | Standard dark red. |
Color::DARK_MAGENTA | 5 | Standard dark magenta. |
Color::DARK_YELLOW | 6 | Standard dark yellow (often rendered as olive/brown). |
Color::LIGHT_GRAY | 7 | Standard light gray (the default foreground on many terminals). |
Color::DARK_GRAY | 8 | Bright black — dark gray. |
Color::BLUE | 9 | Bright blue. |
Color::GREEN | 10 | Bright green. |
Color::CYAN | 11 | Bright cyan. |
Color::RED | 12 | Bright red. |
Color::MAGENTA | 13 | Bright magenta. |
Color::YELLOW | 14 | Bright yellow. |
Color::WHITE | 15 | Bright white. |
Using colors on controls
Most controls expose fourProperty<> fields that accept Color:
| Property | Description |
|---|---|
ForegroundColor | Text color when the control is not focused. |
BackgroundColor | Fill color when the control is not focused. |
FocusedForegroundColor | Text color while the control holds keyboard focus. |
FocusedBackgroundColor | Fill color while the control holds keyboard focus. |
Using colors in RenderOverride
InsideRenderOverride you obtain a RenderStream from context.BeginText() and pipe color commands into it with SetFore and SetBack:
SetFore changes the foreground (glyph) color; SetBack changes the background (cell fill) color. Both commands take effect for all characters written to the stream after the command.
Real example — MessageBubble rendering
The test application’sMessageBubble control uses focus state to swap the color scheme and the message’s isAuthor flag to tint the message body:
focused_, then branch on Color values — is the standard idiom for focus-aware custom rendering in Terminality.