27#include <utility/graphic/color.hpp>
29#include "guillaume/theme.hpp"
64 inline utility::graphic::Color32Bit
65 withAlpha(
const utility::graphic::Color32Bit &color, std::uint8_t alpha)
67 return utility::graphic::Color32Bit(color.getRed(), color.getGreen(),
68 color.getBlue(), alpha);
82 inline utility::graphic::Color32Bit
84 const utility::graphic::Color32Bit &overlay,
87 return overlay.withAlpha(alpha).blendOver(base);
118 inline utility::graphic::Color32Bit
120 const utility::graphic::Color32Bit &overlay,
157 return utility::graphic::Color32Bit(0, 0, 0, 0);
Color helpers shared by the widget systems.
utility::graphic::Color32Bit disabledContainerColor(void)
Fill color of the container of a disabled widget.
utility::graphic::Color32Bit transparentColor(void)
The color written to hide a fill or an outline without removing its component.
utility::graphic::Color32Bit 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 disabledContentColor(void)
Color of the icon, label or outline of a disabled widget.
utility::graphic::Color32Bit withAlpha(const utility::graphic::Color32Bit &color, std::uint8_t alpha)
Copy a color with another alpha channel.
utility::graphic::Color32Bit schemeColor(SchemeColorRole role)
Look up a color role in the color scheme of the active theme.
StateLayer
The interaction states that change how a widget is drawn.
@ DisabledContainer
0.12 opacity of onSurface containers.
@ DisabledContent
0.38 opacity of onSurface content.
std::uint8_t getStateLayerAlpha(theme::StateLayer layer)
Get the opacity the active theme gives to a state layer, as an alpha channel value.
SchemeColorRole
The named colors of a scheme: what a color is used for, not what it looks like.
utility::graphic::Color32Bit getActiveColor(SchemeColorRole role)
Get the color the active scheme gives to a role.