Std.Ui.Theme
15 public declarations
- contrast
Std.Ui.Canvas.Color -> Std.Ui.Canvas.Color -> Float64Contrast ratio between two colors (WCAG 2), from 1 to 21.
- contrastFailures
&Std.Ui.Theme.Theme -> Array[Str]Palette pairings that fail level AA, by name: text and muted text on
- dark
Std.Ui.Theme.ThemeThe dark theme.
- forMode
Std.Ui.Theme.Mode -> Std.Ui.Theme.ThemeThe theme for
mode. - light
Std.Ui.Theme.ThemeThe light theme.
- luminance
Std.Ui.Canvas.Color -> Float64Relative luminance (WCAG 2), from 0 for black to 1 for white.
- meetsContrast
Std.Ui.Canvas.Color -> Std.Ui.Canvas.Color -> Bool -> BoolWhether text in
foregroundonbackgroundmeets level AA: 4.5:1, or - mix
Std.Ui.Canvas.Color -> Std.Ui.Canvas.Color -> Int -> Std.Ui.Canvas.Colorfirstblended towardsecondbypercent(0 to 100, clamped). - Mode
Which appearance a theme is for.
- Palette
Colors named by role rather than by hue, so a view asks for
danger - readableOn
Std.Ui.Canvas.Color -> Std.Ui.Canvas.ColorBlack or white, whichever contrasts more with
background. - space
&Std.Ui.Theme.Theme -> Int -> Intstepsspacing units in pixels. - Theme
Everything a view reads to look consistent.
- TypeScale
Font sizes in pixels, smallest to largest.
- withAccent
&Std.Ui.Theme.Theme -> Std.Ui.Canvas.Color -> Std.Ui.Theme.ThemeThe theme with another accent;
onAccentbecomes whichever of black or
