|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
Color helpers shared by the widget systems: scheme lookup, state layers and the disabled colors. More...
#include <cstdint>#include <utility/graphic/color.hpp>#include "guillaume/theme.hpp"

Go to the source code of this file.
Namespaces | |
| namespace | guillaume::systems::style |
| Color helpers shared by the widget systems. | |
| namespace | guillaume |
| A C++20 UI framework for desktop and XR, built as an entity-component-system. | |
| namespace | guillaume::systems |
| Rules. Every class here runs each frame on the entities that have the components it declares. | |
Functions | |
| utility::graphic::Color32Bit | guillaume::systems::style::withAlpha (const utility::graphic::Color32Bit &color, std::uint8_t alpha) |
| Copy a color with another alpha channel. | |
| utility::graphic::Color32Bit | guillaume::systems::style::stateLayer (const utility::graphic::Color32Bit &base, const utility::graphic::Color32Bit &overlay, std::uint8_t alpha) |
| Blend a translucent tint over a base color. | |
| utility::graphic::Color32Bit | guillaume::systems::style::schemeColor (SchemeColorRole role) |
| Look up a color role in the color scheme of the active theme. | |
| utility::graphic::Color32Bit | guillaume::systems::style::stateLayer (const utility::graphic::Color32Bit &base, const utility::graphic::Color32Bit &overlay, theme::StateLayer layer) |
| Blend a tint over a base color at the opacity the active theme gives to an interaction state. | |
| utility::graphic::Color32Bit | guillaume::systems::style::disabledContentColor (void) |
| Color of the icon, label or outline of a disabled widget. | |
| utility::graphic::Color32Bit | guillaume::systems::style::disabledContainerColor (void) |
| Fill color of the container of a disabled widget. | |
| utility::graphic::Color32Bit | guillaume::systems::style::transparentColor (void) |
| The color written to hide a fill or an outline without removing its component. | |
Color helpers shared by the widget systems: scheme lookup, state layers and the disabled colors.
Everything here is a small inline function of guillaume::systems::style that returns a color; nothing reads or writes a component. The widget systems (Checkbox, Switch, Chip, CommonButton, Menu, TextField, ...) call them from their apply function to resolve the colors they write into components::Color and components::Borders, and guillaume/systems/interaction_helpers.hpp builds its hover and press state layers on them. guillaume/entities/style_helpers.hpp re-exports the same names in guillaume::entities for the widget classes.
Colors come from the active theme at the time of the call, so a result must not be cached across a theme change.
Definition in file style_helpers.hpp.