Module: Utilities::Heatmap
- Defined in:
- lib/utilities/heatmap.rb
Class Method Summary collapse
Class Method Details
.heatmap_color_for(value) ⇒ Object
- 0,1
4 5 6 7 8 9 |
# File 'lib/utilities/heatmap.rb', line 4 def self.heatmap_color_for(value) h = (1 - value) * 360 s = 100 l = value * 50 "hsl(#{h.round(2)},#{s.round(2)}%,#{l.round(2)}%)" end |