Skip to content

Commit fd394b9

Browse files
committed
Fix saturation range ignored for random color ramps
(cherry-picked from 5690402)
1 parent e54b7ae commit fd394b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/symbology-ng/qgsvectorcolorrampv2.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ QList<QColor> QgsVectorRandomColorRampV2::randomColors( int count,
346346
currentHueAngle += 137.50776;
347347
//scale hue to between hueMax and hueMin
348348
h = qBound( 0, qRound(( fmod( currentHueAngle, 360.0 ) / 360.0 ) * ( safeHueMax - safeHueMin ) + safeHueMin ), 359 );
349-
s = qBound( 0, ( qrand() % ( safeSatMax - safeSatMin + 1 ) ) + safeValMax, 255 );
349+
s = qBound( 0, ( qrand() % ( safeSatMax - safeSatMin + 1 ) ) + safeSatMin, 255 );
350350
v = qBound( 0, ( qrand() % ( safeValMax - safeValMin + 1 ) ) + safeValMin, 255 );
351351
colors.append( QColor::fromHsv( h, s, v ) );
352352
}

0 commit comments

Comments
 (0)