ui::theme_colors¶
Namespace-scope declarations of ui::theme_colors from the themes headers.
A theme resource for every color of ThemeColors, read from the theme each time it is used, so it follows light, dark and high contrast. .with_alpha() gives one at another opacity.
Example:
ui::Border{.background = ui::theme_colors::Accent.with_alpha(0.7f)};
ui::Text{.text = "Saved", .foreground = ui::theme_colors::Success};
Constants¶
| Name | Type | Value | |
|---|---|---|---|
Text |
ThemeColor |
[](const Theme& t) { return t.colors().text; } |
ThemeColors::text. |
TextSecondary |
ThemeColor |
[](const Theme& t) { return t.colors().text_secondary; } |
ThemeColors::text_secondary. |
TextDisabled |
ThemeColor |
[](const Theme& t) { return t.colors().text_disabled; } |
ThemeColors::text_disabled. |
TextOnAccent |
ThemeColor |
[](const Theme& t) { return t.colors().text_on_accent; } |
ThemeColors::text_on_accent. |
Link |
ThemeColor |
[](const Theme& t) { return t.colors().link; } |
ThemeColors::link. |
Background |
ThemeColor |
[](const Theme& t) { return t.colors().background; } |
ThemeColors::background. |
Card |
ThemeColor |
[](const Theme& t) { return t.colors().card; } |
ThemeColors::card. |
Overlay |
ThemeColor |
[](const Theme& t) { return t.colors().overlay; } |
ThemeColors::overlay. |
Field |
ThemeColor |
[](const Theme& t) { return t.colors().field; } |
ThemeColors::field. |
FieldText |
ThemeColor |
[](const Theme& t) { return t.colors().field_text; } |
ThemeColors::field_text. |
Scrim |
ThemeColor |
[](const Theme& t) { return t.colors().scrim; } |
ThemeColors::scrim. |
Accent |
ThemeColor |
[](const Theme& t) { return t.colors().accent; } |
ThemeColors::accent. |
AccentHover |
ThemeColor |
[](const Theme& t) { return t.colors().accent_hover; } |
ThemeColors::accent_hover. |
AccentPressed |
ThemeColor |
[](const Theme& t) { return t.colors().accent_pressed; } |
ThemeColors::accent_pressed. |
ControlFill |
ThemeColor |
[](const Theme& t) { return t.colors().control_fill; } |
ThemeColors::control_fill. |
ControlFillHover |
ThemeColor |
[](const Theme& t) { return t.colors().control_fill_hover; } |
ThemeColors::control_fill_hover. |
ControlFillPressed |
ThemeColor |
[](const Theme& t) { return t.colors().control_fill_pressed; } |
ThemeColors::control_fill_pressed. |
ControlFillDisabled |
ThemeColor |
[](const Theme& t) { return t.colors().control_fill_disabled; } |
ThemeColors::control_fill_disabled. |
ControlStroke |
ThemeColor |
[](const Theme& t) { return t.colors().control_stroke; } |
ThemeColors::control_stroke. |
ControlStrokeStrong |
ThemeColor |
[](const Theme& t) { return t.colors().control_stroke_strong; } |
ThemeColors::control_stroke_strong. |
Divider |
ThemeColor |
[](const Theme& t) { return t.colors().divider; } |
ThemeColors::divider. |
Selection |
ThemeColor |
[](const Theme& t) { return t.colors().selection; } |
ThemeColors::selection. |
SelectionText |
ThemeColor |
[](const Theme& t) { return t.colors().selection_text; } |
ThemeColors::selection_text. |
Focus |
ThemeColor |
[](const Theme& t) { return t.colors().focus; } |
ThemeColors::focus. |
FocusInner |
ThemeColor |
[](const Theme& t) { return t.colors().focus_inner; } |
ThemeColors::focus_inner. |
Critical |
ThemeColor |
[](const Theme& t) { return t.colors().critical; } |
ThemeColors::critical. |
Caution |
ThemeColor |
[](const Theme& t) { return t.colors().caution; } |
ThemeColors::caution. |
Success |
ThemeColor |
[](const Theme& t) { return t.colors().success; } |
ThemeColors::success. |
Informational |
ThemeColor |
[](const Theme& t) { return t.colors().informational; } |
ThemeColors::informational. |