mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Heatmap: Show more yellow
Stretch out the yellow zone of the HSV scale, because the yellow band of the true scale appears narrow. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
fd46167ae0
commit
d689390140
1 changed files with 7 additions and 3 deletions
|
@ -393,10 +393,14 @@ QColor DivePercentageItem::ColorScale(double value, int inert)
|
|||
color.setHsvF(0.5 + 0.25 * scaledValue / 0.8, 1.0, 1.0);
|
||||
else if (scaledValue < 1.0) // grade from magenta to black
|
||||
color.setHsvF(0.75, 1.0, (1.0 - scaledValue) / 0.2);
|
||||
else if (value < AMB_PERCENTAGE) // grade from black to green
|
||||
else if (value < AMB_PERCENTAGE) // grade from black to bright green
|
||||
color.setHsvF(0.333, 1.0, (value - AMB_PERCENTAGE * inert / 1000.0) / (AMB_PERCENTAGE - AMB_PERCENTAGE * inert / 1000.0));
|
||||
else if (value < 100) // grade from green to yellow to red
|
||||
color.setHsvF(0.333 * (100.0 - value) / (100.0 - AMB_PERCENTAGE), 1.0, 1.0);
|
||||
else if (value < 65) // grade from bright green (0% M) to yellow-green (30% M)
|
||||
color.setHsvF(0.333 - 0.133 * (value - AMB_PERCENTAGE) / (65.0 - AMB_PERCENTAGE), 1.0, 1.0);
|
||||
else if (value < 85) // grade from yellow-green (30% M) to orange (70% M)
|
||||
color.setHsvF(0.2 - 0.1 * (value - 65.0) / 20.0, 1.0, 1.0);
|
||||
else if (value < 100) // grade from orange (70% M) to red (100% M)
|
||||
color.setHsvF(0.1 * (100.0 - value) / 15.0, 1.0, 1.0);
|
||||
else if (value < 120) // M value exceeded - grade from red to white
|
||||
color.setHsvF(0.0, 1 - (value - 100.0) / 20.0, 1.0);
|
||||
else // white
|
||||
|
|
Loading…
Reference in a new issue