final class UITheme
package smidr
The active UI palette + metric scale.
Surfaces are neutral material-dark ramps; the brand accents are reserved for active/selected
states only. All values are plain 0xAARRGGBB ints so the library carries no framework color
dependency. Widgets read these at render() time, so calling changed() after mutating any
value (or setScale) re-skins every live widget through UIRoot.invalidateAll.
Static variables
staticfinalread onlyPRESETS:Array<UIThemePreset> = buildPresets()
The built-in palettes, in menu order (the first is the default dark theme).
Initialized from buildPresets() rather than an inline literal so the generated API docs
show a short initializer instead of the full colour table.
staticaccent:Int = 0xFF8A5EE0
Primary brand accent — active/selected/primary states ONLY, never surfaces.
Static methods
staticapply(p:UIPalette):Void
Replaces every palette colour at once and re-skins live widgets.
Parameters:
p | the palette to adopt |
|---|
staticapplyAccent(base:Int):Void
Recolours the whole accent family from one base hue (a custom-accent override on top of any preset), deriving the darker fill / bright highlight from it.
Parameters:
base | the accent colour (RGB; alpha forced opaque) |
|---|
staticinlinefs(base:Int):Int
Scales a base font size by the global UI scale.
Parameters:
base | the design font size (at scale 1) |
|---|
Returns:
the scaled size, rounded to the nearest int
staticinlinepx(base:Float):Float
Scales a base pixel metric by the global UI scale.
Parameters:
base | the design-size value (at scale 1) |
|---|
Returns:
the scaled value
staticsetScale(value:Float):Void
Sets the density multiplier and re-skins live widgets.
Parameters:
value | the new scale (> 0; no-op when unchanged) |
|---|