struct UI::ThemeColor

Overview

Material-Design-3-flavoured RGBA bag used by UI::Theme.

Phase 6.12A added #css_override so a colour derived from a UI::DesignTokens::Color sentinel (e.g. Color::SYSTEM_ACCENT) can round-trip its platform-resolved token through the legacy MD3 CSS emitter rather than baking the sentinel's zeroed RGB into a literal rgba(0, 0, 0, 0.0). The default nil keeps every existing call site unchanged.

Defined in:

ui/theme.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(r : Float64, g : Float64, b : Float64, a : Float64 = 1.0, css_override : String | Nil = nil) #

[View source]

Instance Method Detail

def a : Float64 #

def b : Float64 #

def clone #

[View source]
def copy_with(r _r = @r, g _g = @g, b _b = @b, a _a = @a, css_override _css_override = @css_override) #

[View source]
def css_override : String | Nil #

def g : Float64 #

def r : Float64 #