Skip to content
Permalink
Browse files

Fix saturation range ignored for random color ramps

  • Loading branch information
nyalldawson committed Aug 4, 2015
1 parent 27ee8ee commit 569040211618904cb1f4f2eda1019ef0f5c0e8f3
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/symbology-ng/qgsvectorcolorrampv2.cpp
@@ -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 ) );
}

0 comments on commit 5690402

Please sign in to comment.
You can’t perform that action at this time.