Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix saturation range ignored for random color ramps
  • Loading branch information
nyalldawson committed Aug 4, 2015
1 parent 27ee8ee commit 5690402
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/symbology-ng/qgsvectorcolorrampv2.cpp
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 5690402

Please sign in to comment.