|
| static double | relativeLuminance (const QColor &color) |
| |
| static qreal | constrastRatio (const QColor &color1, const QColor &color2) |
| |
| static bool | isDark (const QColor &color) |
| |
| static QColor | mix (const QColor &a, const QColor &b, qreal ratio=0.5) |
| |
|
static ThemeColorPair | mix (const ThemeColorPair &a, const ThemeColorPair &b, qreal ratio=0.5) |
| |
| static QColor | darken (const QColor &c, int percent) |
| |
|
static ThemeColorPair | darken (const ThemeColorPair &p, int percent) |
| |
| static QColor | lighten (const QColor &c, int percent) |
| |
|
static ThemeColorPair | lighten (const ThemeColorPair &p, int percent) |
| |
| static QColor | withAlpha (const QColor &c, int alpha) |
| |
|
static ThemeColorPair | withAlpha (const ThemeColorPair &p, int alpha) |
| |
| static QColor | withAlphaF (const QColor &c, qreal alpha) |
| |
|
static ThemeColorPair | withAlphaF (const ThemeColorPair &p, qreal alpha) |
| |
| static QColor | contrastingText (const QColor &surface) |
| |
|
static ThemeColorPair | contrastingText (const ThemeColorPair &pair) |
| |
| static QColor | contrastingTextOver (const QColor &surface, const QColor &backdrop) |
| |
| static QColor | disabled (const QColor &c, const QColor &background) |
| |
|
static ThemeColorPair | disabled (const ThemeColorPair &p, const QColor &background) |
| |
| static QColor | hoverBg (const QColor &c, const QColor &background) |
| |
|
static ThemeColorPair | hoverBg (const ThemeColorPair &p, const QColor &background) |
| |
Pure color-math helpers, independent of the running app's theme or palette.
Every method is static and side-effect-free except contrastingText(QColor) which — when the surface has alpha — asks ThemeManager for the current app mode to pick a fallback backdrop. That coupling is deliberate: the caller wants "the right foreground
for this translucent surface as rendered right now", which is a theme-runtime question.