Skip to content

Commit 5690402

Browse files
committed
Fix saturation range ignored for random color ramps
1 parent 27ee8ee commit 5690402

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/symbology-ng/qgsvectorcolorrampv2.cpp

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

0 commit comments

Comments
 (0)