mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3919 Contrast colors for contour lines
This commit is contained in:
@@ -81,13 +81,33 @@ cvf::Color3f RiaColorTools::brightContrastColor()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Color3f RiaColorTools::constrastColor(cvf::Color3f backgroundColor)
|
||||
cvf::Color3f RiaColorTools::darkContrastColorSofter()
|
||||
{
|
||||
return cvf::Color3f::fromByteColor(30, 30, 30);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Color3f RiaColorTools::brightContrastColorSofter()
|
||||
{
|
||||
return cvf::Color3f::fromByteColor(200, 200, 200);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Color3f RiaColorTools::constrastColor(cvf::Color3f backgroundColor, bool softerContrast)
|
||||
{
|
||||
if (isBrightnessAboveThreshold(backgroundColor))
|
||||
{
|
||||
if (softerContrast)
|
||||
return darkContrastColorSofter();
|
||||
return darkContrastColor();
|
||||
}
|
||||
|
||||
if (softerContrast)
|
||||
return brightContrastColorSofter();
|
||||
return brightContrastColor();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user