Apparently QColor::set[color]f takes colors as floats clamped to the [0,1] range.

--HG--
branch : gsoc2013-dfighter
hg/feature/gsoc2013-dfighter
dfighter1985 11 years ago
parent c6bb6ec2a9
commit 1d71a540ba

@ -127,10 +127,10 @@ namespace MaterialEditor
} }
QColor color; QColor color;
color.setRedF( c[ 0 ] ); color.setRedF( c[ 0 ] / 255.0f );
color.setGreenF( c[ 1 ] ); color.setGreenF( c[ 1 ] / 255.0f );
color.setBlueF( c[ 2 ] ); color.setBlueF( c[ 2 ] / 255.0f );
color.setAlphaF( c[ 3 ] ); color.setAlphaF( c[ 3 ] / 255.0f );
v = color; v = color;

Loading…
Cancel
Save