Skip to main content

Module theme

Module theme 

Source

Structs§

Theme
ThemeColor

Enums§

ThemeAccent
ThemeColorRole
ThemeColorShade
UnknownThemeColor
A theme colour name that does not match any known role or shade.

Constants§

ACCENT_COUNT
Amount of accent colors, one per ThemeAccent.

Functions§

color_to_hex
composite_color
Alpha-composite a foreground color over a background.
contrast_ratio
Compute the WCAG contrast ratio between two colors.
darken
default_theme
from_hsva
generated_theme_accents
Derives the accent palette of palette.
hex_to_color
is_dark
lighten
mix_color
Linearly interpolate (mix) two colors by a foreground-weight factor.
relative_luminance
Compute the relative luminance of a color per the WCAG specification.
to_hsva