mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improve history curve color and symbols
This commit is contained in:
@@ -184,6 +184,26 @@ QColor RiaColorTools::blendQColors( const QColor& color1, const QColor& color2,
|
||||
( color1.blue() * weight1 + color2.blue() * weight2 ) / weightsum );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Color3f RiaColorTools::makeLighter( const cvf::Color3f& color, float normalizedScalingFactor )
|
||||
{
|
||||
auto qColor = toQColor( color );
|
||||
|
||||
double h = 0.0;
|
||||
double s = 0.0;
|
||||
double l = 0.0;
|
||||
qColor.getHslF( &h, &s, &l );
|
||||
|
||||
l = l + ( 1.0 - l ) * normalizedScalingFactor;
|
||||
l = std::min( 1.0, l );
|
||||
|
||||
qColor.setHslF( h, s, l );
|
||||
|
||||
return fromQColorTo3f( qColor );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user