hue is -1 for grey colors

This commit is contained in:
Sébastien Loriot 2015-08-05 17:42:58 +02:00
parent 5619bd3654
commit dd3e199fcd
1 changed files with 2 additions and 1 deletions

View File

@ -14,8 +14,9 @@ compute_color_map(QColor base_color,
qreal h = hue;
for(unsigned i = 0; i < nb_of_colors; ++i) {
h += step;
if (h!=-1) h += step;
if ( h > 1 ) { h -= 1; }
*out++ = QColor::fromHsvF(h,
base_color.saturationF(),
base_color.valueF());