31 qreal
x = chroma*(1-qAbs(std::fmod(h1,2)-1));
33 if ( h1 >= 0 && h1 < 1 )
34 col = QColor::fromRgbF(chroma,
x,0);
36 col = QColor::fromRgbF(
x,chroma,0);
38 col = QColor::fromRgbF(0,chroma,
x);
40 col = QColor::fromRgbF(0,
x,chroma);
42 col = QColor::fromRgbF(
x,0,chroma);
44 col = QColor::fromRgbF(chroma,0,
x);
48 return QColor::fromRgbF(
49 qBound(0.0,col.redF()+m,1.0),
50 qBound(0.0,col.greenF()+m,1.0),
51 qBound(0.0,col.blueF()+m,1.0),
57 qreal chroma = (1 - qAbs(2*lig-1))*sat;
59 qreal
x = chroma*(1-qAbs(std::fmod(h1,2)-1));
61 if ( h1 >= 0 && h1 < 1 )
62 col = QColor::fromRgbF(chroma,
x,0);
64 col = QColor::fromRgbF(
x,chroma,0);
66 col = QColor::fromRgbF(0,chroma,
x);
68 col = QColor::fromRgbF(0,
x,chroma);
70 col = QColor::fromRgbF(
x,0,chroma);
72 col = QColor::fromRgbF(chroma,0,
x);
74 qreal m = lig-chroma/2;
76 return QColor::fromRgbF(
77 qBound(0.0,col.redF()+m,1.0),
78 qBound(0.0,col.greenF()+m,1.0),
79 qBound(0.0,col.blueF()+m,1.0),