Color Styling
Tesserae uses CSS variables for theme colors and exposes helpers for custom color management.
Theme colors
Use Theme constants for consistent colors across components:
The theme exposes default, primary, secondary, danger, and success color variables through nested classes like Theme.Default and Theme.Primary.
Switching light/dark mode
Theme mode toggles a tss-dark-mode CSS class on the document body.
Customizing theme colors
To override primary and background colors globally, call:
SetPrimary and SetBackground generate CSS variables for both light and dark themes at runtime.
Working with Color
The Color helper supports parsing from hex/rgba strings and constructing from ARGB components:
Color also supports evaluating CSS variables via Color.EvalVar.