32 explicit Color(QObject *parent =
nullptr);
38 Q_INVOKABLE QColor
transparent(
const QColor &color, qreal alpha);
44 Q_INVOKABLE QColor
blend(
const QColor &color1,
const QColor &color2, qreal alpha);
49 Q_INVOKABLE qreal
luminance(
const QColor &color);
61 Q_INVOKABLE QColor
lightDark(
const QColor &background,
const QColor &lightColor,
62 const QColor &darkColor);
64 static Color *
create(QQmlEngine *engine, QJSEngine *jsEngine);
Utility functions for colors.
Definition color.h:27
static Color * create(QQmlEngine *engine, QJSEngine *jsEngine)
Definition color.cpp:52
Q_INVOKABLE QColor blend(const QColor &color1, const QColor &color2, qreal alpha)
Definition color.cpp:27
Q_INVOKABLE qreal luminance(const QColor &color)
Definition color.cpp:36
Q_INVOKABLE QColor lightDark(const QColor &background, const QColor &lightColor, const QColor &darkColor)
Definition color.cpp:47
Q_INVOKABLE bool isDarkColor(const QColor &color)
Definition color.cpp:41
Q_INVOKABLE QColor transparent(const QColor &color, qreal alpha)
Definition color.cpp:22