terminal/theme
import { … } from 'zidane-ui/terminal'ui/src/terminal/theme.ts
Functions#
solidFunction#
color as an opaque #rrggbb, composited over under when it has alpha.
function solid(color: string, under: string): stringParameters
| Name | Type | Description |
|---|---|---|
| color | string | Any CSS colour |
| under | string | The colour beneath, usually the terminal background. |
Returns
stringterminalThemeFunction#
Maps a resolved palette to terminal colors, every one opaque over the palette background (see the module comment for the ANSI mapping).
function terminalTheme(p: ResolvedPalette): TerminalThemeParameters
| Name | Type | Description |
|---|---|---|
| p | ResolvedPalette | The resolved palette of the current theme. |
Returns
Interfaces#
TerminalThemeInterface#
Same shape as ghostty-web's ITheme (kept here so this stays import-free of the package).
interface TerminalThemeProperties
| Name | Type | Description |
|---|---|---|
| background | string | The terminal background: the palette background, opaque. |
| black | string | ANSI 0: the darkest surface on dark themes, the text colour on light ones. |
| blue | string | ANSI 4: the info token. |
| brightBlack | string | ANSI 8: subtle text (dim output, comments). |
| brightBlue | string | ANSI 12: info, mixed 30% toward the text. |
| brightCyan | string | ANSI 14: cyan, mixed 30% toward the text. |
| brightGreen | string | ANSI 10: success, mixed 30% toward the text. |
| brightMagenta | string | ANSI 13: the secondary accent, mixed 30% toward the text. |
| brightRed | string | ANSI 9: danger, mixed 30% toward the text. |
| brightWhite | string | ANSI 15: the text on dark themes, muted text on light ones. |
| brightYellow | string | ANSI 11: warn, mixed 30% toward the text. |
| cursor | string | Cursor block: the accent. |
| cursorAccent | string | Text under the cursor: the background. |
| cyan | string | ANSI 6: halfway between info and success. |
| foreground | string | Default text: the palette text. |
| green | string | ANSI 2: the success token. |
| magenta | string | ANSI 5: the secondary accent. |
| red | string | ANSI 1: the danger token. |
| selectionBackground | string | Selection fill: the palette selection. |
| selectionForeground | string | Selected text: the palette text. |
| white | string | ANSI 7: muted text on dark themes, subtle text on light ones. |
| yellow | string | ANSI 3: the warn token. |