Skip to content

Commit

Permalink
Fix saturation range ignored for random color ramps
Browse files Browse the repository at this point in the history
(cherry-picked from 5690402)
  • Loading branch information
nyalldawson committed Aug 4, 2015
1 parent eb3cee1 commit 6a88720
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/symbology-ng/qgsvectorcolorrampv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ QList<QColor> QgsVectorRandomColorRampV2::randomColors( int count,
currentHueAngle += 137.50776;
//scale hue to between hueMax and hueMin
h = qBound( 0, qRound(( fmod( currentHueAngle, 360.0 ) / 360.0 ) * ( safeHueMax - safeHueMin ) + safeHueMin ), 359 );
s = qBound( 0, ( qrand() % ( safeSatMax - safeSatMin + 1 ) ) + safeValMax, 255 );
s = qBound( 0, ( qrand() % ( safeSatMax - safeSatMin + 1 ) ) + safeSatMin, 255 );
v = qBound( 0, ( qrand() % ( safeValMax - safeValMin + 1 ) ) + safeValMin, 255 );
colors.append( QColor::fromHsv( h, s, v ) );
}
Expand Down

0 comments on commit 6a88720

Please sign in to comment.