tools/tui/src/theme.ts
openaliro/openaliro
Module

theme.ts

tools/tui/src/theme.ts3 documented symbols

used by app.tsx devices.ts motion.ts

API

Fexport function panelChrome(color: RGBA = theme.line)

tools/tui/src/theme.ts:37

A panel's border and both of its title rules share one colour, because OpenTUI has a single titleColor and no bottomTitleColor. That turns out to be the right constraint: colour says what state the panel is in, and the label and its hints brighten together when the panel is the one you are using.

called by App, CommandOutput, SerialTerminal, SidePane, WizardCard

Fexport function mix(from: RGBA, to: RGBA, t: number): RGBA

tools/tui/src/theme.ts:54

Blend two theme colours for an in-flight animation. toInts() resolves an indexed or default colour to OpenTUI's own RGB approximation of it, so a blended colour no longer defers to the terminal's real palette. That is fine mid-fade and wrong at rest, which is why every animation here ends by assigning the theme token rather than mix(a, b, 1).

called by settle  ·  calls at

Fexport const settle = (from: RGBA, to: RGBA, t: number): RGBA => (t <= 0 ? from : t >= 1 ? to : mix(from, to, t))

tools/tui/src/theme.ts:63

mix, except the endpoints hand back the theme tokens so a settled frame is palette-true.

called by App, colorFor, createFade, titleColor  ·  calls mix
Undocumented (1)

at