Skip to content

Commit

Permalink
Limit palette for a Heatmap color
Browse files Browse the repository at this point in the history
.. hue goes red-yellow-green-cyan-blue-magenta-purple-red

   we only really want the first half of that range for our
   heatmap, which effectively makes it red-amber-green with
   cyan for very low numbers.

   As a palette it will make a lot more sense to the majority
   of users.

   We may look to add multiple schemes, for example limit to
   a single color range or brown/blue etc etc.
  • Loading branch information
liversedge committed Sep 13, 2021
1 parent 08876a9 commit 437c38f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Core/Utils.cpp
Expand Up @@ -600,7 +600,7 @@ QColor
heatcolor(double value)
{
QColor returning;
returning.setHslF(1-value, 1, 0.5f);
returning.setHslF((1-value)/2, 1, 0.5f); // hue goes red-yellow-green-cyan then blue-magenta-purple-red - we want the first half

return returning;
}
Expand Down

0 comments on commit 437c38f

Please sign in to comment.