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

@:value(buildPresets())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.

@:value(0xFF8A5EE0)staticaccent:Int = 0xFF8A5EE0

Primary brand accent — active/selected/primary states ONLY, never surfaces.

@:value(0xFFC558D6)staticaccentAlt:Int = 0xFFC558D6

Alternate accent hue (secondary emphasis).

@:value(0xFF6B3FC4)staticaccentDark:Int = 0xFF6B3FC4

Darker accent fill (primary buttons, checked boxes).

@:value(0xFF121214)staticbg:Int = 0xFF121214

Window/backdrop — the darkest step of the neutral surface ramp.

@:value(0xFF3C3C44)staticborder:Int = 0xFF3C3C44

Standard 1px border.

@:value(0xFF585864)staticborder2:Int = 0xFF585864

Emphasized border (popups, focus-adjacent chrome).

@:value(0xFF2C2C32)staticcard:Int = 0xFF2C2C32

Card surface (grouped content blocks).

@:value(0xFFF05C7C)staticdanger:Int = 0xFFF05C7C

Destructive state (delete buttons, errors).

@:value(0xFFE6AEEF)statichighlight:Int = 0xFFE6AEEF

Bright accent tint (selection highlights).

@:value(0xFF17171B)staticinputBg:Int = 0xFF17171B

Text-input well (recessed).

@:value(0xFF1E1E21)staticpanel:Int = 0xFF1E1E21

Base panel surface (docks, scroll panes).

@:value(0xFF26262B)staticpanel2:Int = 0xFF26262B

Raised surface (buttons, chips, value boxes).

@:value(0xFF34343B)staticpanel3:Int = 0xFF34343B

Highest surface (hover pills, active rows).

@:value(7)staticradius:Float = 7

Base corner radius, pre-scale.

@:value(1.0)staticread onlyscale:Float = 1.0

Global UI density multiplier (user setting). Apply via setScale.

@:value(0xFF63D68A)staticsuccess:Int = 0xFF63D68A

Positive state (enabled dots, confirmations).

@:value(0xFFE9E7EF)statictext:Int = 0xFFE9E7EF

Primary text.

@:value(0xFFB2B0BC)statictext2:Int = 0xFFB2B0BC

Secondary text (labels, inactive titles).

@:value(0xFF7F7D8A)statictext3:Int = 0xFF7F7D8A

Tertiary text (hints, captions).

@:value(0xFFFFCA6E)staticwarning:Int = 0xFFFFCA6E

Caution state.

@:value(null)staticonChanged:() ‑> Void = null

Fired after theme mutations; UIRoot assigns this to re-render every widget.

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)

staticchanged():Void

Notifies live widgets that theme values changed.

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)