We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5690402 commit 1d2b4cbCopy full SHA for 1d2b4cb
src/core/symbology-ng/qgsvectorcolorrampv2.cpp
@@ -297,7 +297,7 @@ double QgsVectorRandomColorRampV2::value( int index ) const
297
QColor QgsVectorRandomColorRampV2::color( double value ) const
298
{
299
int colorCnt = mColors.count();
300
- int colorIdx = ( int )( value * colorCnt );
+ int colorIdx = ( int )( value * ( colorCnt - 1 ) );
301
302
if ( colorIdx >= 0 && colorIdx < colorCnt )
303
return mColors.at( colorIdx );
0 commit comments