| 1 | /* SPDX-FileCopyrightText: 2020 Noah Davis <noahadvs@gmail.com> |
| 2 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
| 3 | */ |
| 4 | |
| 5 | #include "kcolorutilssingleton.h" |
| 6 | #include <KColorUtils> |
| 7 | |
| 8 | qreal KColorUtilsSingleton::hue(const QColor &color) |
| 9 | { |
| 10 | return KColorUtils::hue(color); |
| 11 | } |
| 12 | |
| 13 | qreal KColorUtilsSingleton::chroma(const QColor &color) |
| 14 | { |
| 15 | return KColorUtils::chroma(color); |
| 16 | } |
| 17 | |
| 18 | qreal KColorUtilsSingleton::luma(const QColor &color) |
| 19 | { |
| 20 | return KColorUtils::luma(color); |
| 21 | } |
| 22 | |
| 23 | qreal KColorUtilsSingleton::contrastRatio(const QColor &color1, const QColor &color2) |
| 24 | { |
| 25 | return KColorUtils::contrastRatio(color1, color2); |
| 26 | } |
| 27 | |
| 28 | QColor KColorUtilsSingleton::hcyColor(qreal hue, qreal chroma, qreal luma, qreal alpha) |
| 29 | { |
| 30 | return KColorUtils::hcyColor(hue, chroma, luma, alpha); |
| 31 | } |
| 32 | |
| 33 | QColor KColorUtilsSingleton::lighten(const QColor &color, qreal amount, qreal chromaInverseGain) |
| 34 | { |
| 35 | return KColorUtils::lighten(color, amount, chromaInverseGain); |
| 36 | } |
| 37 | |
| 38 | QColor KColorUtilsSingleton::darken(const QColor &color, qreal amount, qreal chromaGain) |
| 39 | { |
| 40 | return KColorUtils::darken(color, amount, chromaGain); |
| 41 | } |
| 42 | |
| 43 | QColor KColorUtilsSingleton::shade(const QColor &color, qreal lumaAmount, qreal chromaAmount) |
| 44 | { |
| 45 | return KColorUtils::shade(color, lumaAmount, chromaAmount); |
| 46 | } |
| 47 | |
| 48 | QColor KColorUtilsSingleton::tint(const QColor &base, const QColor &color, qreal amount) |
| 49 | { |
| 50 | return KColorUtils::tint(base, color, amount); |
| 51 | } |
| 52 | |
| 53 | QColor KColorUtilsSingleton::mix(const QColor &color1, const QColor &color2, qreal bias) |
| 54 | { |
| 55 | return KColorUtils::mix(c1: color1, c2: color2, bias); |
| 56 | } |
| 57 | |
| 58 | #include "moc_kcolorutilssingleton.cpp" |
| 59 | |