Sha256: c6dfc9214c76c20df063a628ac786c51222ef95008cdf17a307b5581dd47fa4a

Contents?: true

Size: 223 Bytes

Versions: 3

Compression:

Stored size: 223 Bytes

Contents

module Dominikh
  module ColoredGraph
    def color
      red = ((255/100.0) * value)
      green = 255 - ((255/100.0) * value)

      color = "#%.2x%.2x00" % [red, green]
      Subtlext::Color.new(color)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
subtle-graph-0.0.3 lib/subtle/dominikh/graph/colored_graph.rb
subtle-graph-0.0.2 lib/subtle/dominikh/graph/colored_graph.rb
subtle-graph-0.0.1 lib/subtle/dominikh/graph/colored_graph.rb