Expand description
The tray UI’s look: two palettes (dark, light) held to WCAG 2.2 AA contrast by tests, the egui visuals and style built from them, and the soft “breathing” glow of running work.
Structs§
- Palette
- Every colour the UI paints with.
Enums§
- Theme
Choice - The operator’s theme choice (Config → This window).
- Tone
- What a colour means.
Constants§
- BREATH_
PERIOD_ SECS - One breath of the running glow, in seconds: slow enough to read as calm.
- CARD_
RADIUS - Corner radius of cards and panels, in points.
- CONTROL_
RADIUS - Corner radius of buttons, inputs and pills, in points.
- NON_
TEXT_ CONTRAST_ MIN - WCAG 2.2 AA minimum contrast for indicators and focus rings (1.4.11).
- TEXT_
CONTRAST_ MIN - WCAG 2.2 AA minimum contrast for text (1.4.3).
Functions§
- apply
- Apply both palettes and the operator’s theme choice to
ctx. - breath
- How strongly running work glows at time
t(seconds), 0.35 to 1.0: one slow breath perBREATH_PERIOD_SECS. Reduce motion holds it steady at full strength. - contrast_
ratio - WCAG contrast ratio between two opaque colours, 1.0 to 21.0.
- luminance
- WCAG relative luminance of an opaque colour.
- stroke
- A stroke of
widthpoints (typed, so float literals never fall back). - style_
tweaks - Type scale and spacing, the same in both themes.
- visuals
- The egui visuals of
palette. - with_
alpha colouratalpha(0..=1), for glows over any background.