File indexing completed on 2024-05-12 05:38:56
0001 /* SPDX-FileCopyrightText: 2020 Noah Davis <noahadvs@gmail.com> 0002 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0003 */ 0004 0005 #include "kcolorutilssingleton.h" 0006 #include <KColorUtils> 0007 0008 KColorUtilsSingleton::KColorUtilsSingleton(QObject *parent) 0009 : QObject(parent) 0010 { 0011 } 0012 0013 qreal KColorUtilsSingleton::hue(const QColor &color) 0014 { 0015 return KColorUtils::hue(color); 0016 } 0017 0018 qreal KColorUtilsSingleton::chroma(const QColor &color) 0019 { 0020 return KColorUtils::chroma(color); 0021 } 0022 0023 qreal KColorUtilsSingleton::luma(const QColor &color) 0024 { 0025 return KColorUtils::luma(color); 0026 } 0027 0028 qreal KColorUtilsSingleton::contrastRatio(const QColor &color1, const QColor &color2) 0029 { 0030 return KColorUtils::contrastRatio(color1, color2); 0031 } 0032 0033 QColor KColorUtilsSingleton::hcyColor(qreal hue, qreal chroma, qreal luma, qreal alpha) 0034 { 0035 return KColorUtils::hcyColor(hue, chroma, luma, alpha); 0036 } 0037 0038 QColor KColorUtilsSingleton::lighten(const QColor &color, qreal amount, qreal chromaInverseGain) 0039 { 0040 return KColorUtils::lighten(color, amount, chromaInverseGain); 0041 } 0042 0043 QColor KColorUtilsSingleton::darken(const QColor &color, qreal amount, qreal chromaGain) 0044 { 0045 return KColorUtils::darken(color, amount, chromaGain); 0046 } 0047 0048 QColor KColorUtilsSingleton::shade(const QColor &color, qreal lumaAmount, qreal chromaAmount) 0049 { 0050 return KColorUtils::shade(color, lumaAmount, chromaAmount); 0051 } 0052 0053 QColor KColorUtilsSingleton::tint(const QColor &base, const QColor &color, qreal amount) 0054 { 0055 return KColorUtils::tint(base, color, amount); 0056 } 0057 0058 QColor KColorUtilsSingleton::mix(const QColor &color1, const QColor &color2, qreal bias) 0059 { 0060 return KColorUtils::mix(color1, color2, bias); 0061 } 0062 0063 #include "moc_kcolorutilssingleton.cpp"