Arlecchino.Rendering.Colors
Classes
| Type | Summary |
|---|---|
Contrast | How far apart two colors read, by the ratio the accessibility guidelines are written in. It runs from 1 for a color on itself to 21 for black on white. |
RgbTermColor | A style built from exact colors, for where the color itself is the point rather than a role in Theme. It falls back to the nearest palette color where the terminal cannot do 24-bit. |
Shade | Colors worked out against the background they will be read on, so a palette is written as how far apart things should read rather than as a list of colors that only suit one terminal. |
TermColor | A style built from the sixteen-color palette. This is what the roles on Theme are made of and what chrome should use, because those colors follow the terminal's own theme. |
Theme | The palette in use, reachable from anywhere that draws. Views pick a role here rather than a color, so swapping Theme.Palette restyles the whole application, chrome included. |
ThemePalette | The colors behind the roles in Theme. Every role has a default, so a palette that overrides two of them is a valid palette — and what it does not override is the framework's own colors, described on ThemePalette.Arlecchino. |
Structs
| Type | Summary |
|---|---|
Oklch | A color as lightness, chroma and hue, in the space where those three come apart. Moving the lightness of an Rgb here leaves the color recognizably itself, which moving it in HSL does not. |
Rgb | A 24-bit color. Shown exactly only where the terminal supports true color; otherwise it is mapped to the nearest palette entry — see TerminalCapabilities. |
Interfaces
| Type | Summary |
|---|---|
IArlecchinoColor | Anything that can style a cell. The frame writer only ever asks for IArlecchinoColor.Ansi and compares styles by reference, so hold on to instances instead of building one per cell. |
Enums
| Type | Summary |
|---|---|
ColorSupport | How much color the terminal can show. Detected once at startup by TerminalCapabilities.DetectColor and used by every style when it builds its escape sequence. |
TerminalColor | The sixteen ANSI colors plus the terminal's own default. Exact shades belong to the terminal theme, so chrome picks a role from Theme rather than a color here. |
TextStyle | Text attributes a style carries on top of its colors. Combine them with |; a terminal that does not support one simply ignores it. |