Expand description
Shared Style Constants for TUI/WASM Parity
This module provides unified color and style constants to ensure visual consistency between TUI (ratatui) and WASM (Canvas/CSS) renders.
§Architecture (OR-001 Compliant)
All visual constants are defined ONCE here and used by both:
- TUI: via
ratatui::style::Colorconversions - WASM: via CSS variable injection / Canvas fill styles
§References
- WCAG 2.1 AA contrast requirements
- TPS Visual Control (見える化)
Constants§
- ACCENT
- Accent color (teal/cyan) - success, highlights
- ACCENT_
ERROR - Error color (red/coral)
- ACCENT_
WARN - Warning color (yellow/gold)
- BG_
PRIMARY - Primary background color (darkest)
- BG_
SECONDARY - Secondary background color (panels)
- BG_
TERTIARY - Tertiary background color (canvas/content)
- BORDER
- Primary border color
- CITY_
NODE - City node color (yellow dots on map)
- FONT_
MONO - Font family for monospace text
- FONT_
SIZE_ BASE - Font size base (rem)
- FONT_
SIZE_ SMALL - Font size small (rem)
- PROBAR
- Probar brand color (testing indicator)
- TEXT_
PRIMARY - Primary text color (high contrast)
- TEXT_
SECONDARY - Secondary text color (labels, muted)
- TOUR_
PATH - Tour path color (teal lines)
Functions§
- css_
variables - Generate CSS custom properties string for injection
- hex_
to_ rgb - Parse hex color to RGB tuple