KDEUI
kcolorutils.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KCOLORUTILS_H
00023 #define KCOLORUTILS_H
00024
00025 #include <kdeui_export.h>
00026 #include <QtGui/QPainter>
00027
00028 class QColor;
00029
00033 namespace KColorUtils {
00044 KDEUI_EXPORT qreal luma(const QColor&);
00045
00058 KDEUI_EXPORT qreal contrastRatio(const QColor&, const QColor&);
00059
00075 KDEUI_EXPORT QColor lighten(const QColor&, qreal amount = 0.5, qreal chromaInverseGain = 1.0);
00076
00092 KDEUI_EXPORT QColor darken(const QColor&, qreal amount = 0.5, qreal chromaGain = 1.0);
00093
00106 KDEUI_EXPORT QColor shade(const QColor&, qreal lumaAmount, qreal chromaAmount = 0.0);
00107
00120 KDEUI_EXPORT QColor tint(const QColor &base, const QColor &color, qreal amount = 0.3);
00121
00133 KDEUI_EXPORT QColor mix(const QColor &c1, const QColor &c2,
00134 qreal bias = 0.5);
00135
00148 KDEUI_EXPORT QColor overlayColors(const QColor &base, const QColor &paint,
00149 QPainter::CompositionMode comp = QPainter::CompositionMode_SourceOver);
00150
00151 }
00152
00153 #endif // KCOLORUTILS_H
00154