Kirigami2
colorutils.h
26 Dark, /**< The item is dark and requires a light foreground color to achieve readable contrast. */
27 Light, /**< The item is light and requires a dark foreground color to achieve readable contrast. */
189 Q_INVOKABLE QColor tintWithAlpha(const QColor &targetColor, const QColor &tintColor, double alpha);
Q_OBJECTQ_OBJECT
Q_INVOKABLE qreal grayForColor(const QColor &color)
Same Algorithm as brightnessForColor but returns a 0 to 1 value for an estimate of the equivalent gra...
Definition: colorutils.cpp:29
Q_ENUM(...)
@ Light
The item is light and requires a dark foreground color to achieve readable contrast.
Definition: colorutils.h:27
Q_INVOKABLE ColorUtils::Brightness brightnessForColor(const QColor &color)
Returns whether a color is bright or dark.
Definition: colorutils.cpp:20
Q_INVOKABLE QColor alphaBlend(const QColor &foreground, const QColor &background)
Returns the result of overlaying the foreground color on the background color.
Definition: colorutils.cpp:34
@ Dark
The item is dark and requires a light foreground color to achieve readable contrast.
Definition: colorutils.h:26
Utilities for processing items to obtain colors and information useful for UIs that need to adjust to...
Definition: colorutils.h:18
Q_INVOKABLE QColor adjustColor(const QColor &color, const QJSValue &adjustments)
Increases or decreases the properties of color by fixed amounts.
Definition: colorutils.cpp:134
Q_INVOKABLE QColor scaleColor(const QColor &color, const QJSValue &adjustments)
Smoothly scales colors.
Definition: colorutils.cpp:180
Q_INVOKABLEQ_INVOKABLE
static Q_INVOKABLE qreal chroma(const QColor &color)
Returns the CIELAB chroma of the given color.
Definition: colorutils.cpp:301
Q_INVOKABLE QColor tintWithAlpha(const QColor &targetColor, const QColor &tintColor, double alpha)
Tint a color using a separate alpha value.
Definition: colorutils.cpp:227
Q_INVOKABLE QColor linearInterpolation(const QColor &one, const QColor &two, double balance)
Returns a linearly interpolated color between color one and color two.
Definition: colorutils.cpp:60
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Jan 29 2023 04:11:03 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Jan 29 2023 04:11:03 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.