struct
UI::DesignTokens::ColorPalette
- UI::DesignTokens::ColorPalette
- Struct
- Value
- Object
Overview
23 semantic color roles. The set is the union of the Material 3 roles
already in UI::Theme and the surface/text/border/state set in the
Components::CSS::Tokens::Theme web token bag. Names use library-generic
vocabulary, not platform vocabulary.
Defined in:
ui/design_tokens.crConstructors
Instance Method Summary
- #border_default : Color
- #border_focus : Color
- #border_strong : Color
- #border_subtle : Color
- #brand_accent : Color
- #brand_primary : Color
- #brand_primary_active : Color
- #brand_primary_hover : Color
- #brand_secondary : Color
- #clone
- #copy_with(brand_primary _brand_primary = @brand_primary, brand_primary_hover _brand_primary_hover = @brand_primary_hover, brand_primary_active _brand_primary_active = @brand_primary_active, brand_secondary _brand_secondary = @brand_secondary, brand_accent _brand_accent = @brand_accent, surface_canvas _surface_canvas = @surface_canvas, surface_panel _surface_panel = @surface_panel, surface_elevated _surface_elevated = @surface_elevated, surface_sunken _surface_sunken = @surface_sunken, surface_inverse _surface_inverse = @surface_inverse, text_primary _text_primary = @text_primary, text_secondary _text_secondary = @text_secondary, text_muted _text_muted = @text_muted, text_inverse _text_inverse = @text_inverse, text_link _text_link = @text_link, border_subtle _border_subtle = @border_subtle, border_default _border_default = @border_default, border_strong _border_strong = @border_strong, border_focus _border_focus = @border_focus, success _success = @success, warning _warning = @warning, danger _danger = @danger, info _info = @info)
- #danger : Color
- #info : Color
-
#lookup(role : Symbol) : Color | Nil
Lookup by symbol (used by renderer token helpers).
- #success : Color
- #surface_canvas : Color
- #surface_elevated : Color
- #surface_inverse : Color
- #surface_panel : Color
- #surface_sunken : Color
- #text_inverse : Color
- #text_link : Color
- #text_muted : Color
- #text_primary : Color
- #text_secondary : Color
-
#to_h : Hash(String, Color)
Iterating accessor used by generators and
#lookup. - #warning : Color
Constructor Detail
def self.new(brand_primary : Color, brand_primary_hover : Color, brand_primary_active : Color, brand_secondary : Color, brand_accent : Color, surface_canvas : Color, surface_panel : Color, surface_elevated : Color, surface_sunken : Color, surface_inverse : Color, text_primary : Color, text_secondary : Color, text_muted : Color, text_inverse : Color, text_link : Color, border_subtle : Color, border_default : Color, border_strong : Color, border_focus : Color, success : Color, warning : Color, danger : Color, info : Color)
#
Instance Method Detail
def copy_with(brand_primary _brand_primary = @brand_primary, brand_primary_hover _brand_primary_hover = @brand_primary_hover, brand_primary_active _brand_primary_active = @brand_primary_active, brand_secondary _brand_secondary = @brand_secondary, brand_accent _brand_accent = @brand_accent, surface_canvas _surface_canvas = @surface_canvas, surface_panel _surface_panel = @surface_panel, surface_elevated _surface_elevated = @surface_elevated, surface_sunken _surface_sunken = @surface_sunken, surface_inverse _surface_inverse = @surface_inverse, text_primary _text_primary = @text_primary, text_secondary _text_secondary = @text_secondary, text_muted _text_muted = @text_muted, text_inverse _text_inverse = @text_inverse, text_link _text_link = @text_link, border_subtle _border_subtle = @border_subtle, border_default _border_default = @border_default, border_strong _border_strong = @border_strong, border_focus _border_focus = @border_focus, success _success = @success, warning _warning = @warning, danger _danger = @danger, info _info = @info)
#
Lookup by symbol (used by renderer token helpers).
Iterating accessor used by generators and #lookup. Keys use the same
kebab vocabulary that ships in the CSS output (brand-primary, etc.).