Skip to content

Instantly share code, notes, and snippets.

@AJFaraday
Created May 13, 2014 21:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AJFaraday/97b9288919ab7f6dfd15 to your computer and use it in GitHub Desktop.
Save AJFaraday/97b9288919ab7f6dfd15 to your computer and use it in GitHub Desktop.
Generate green-red fade classes in ruby for SCSS
i = 0
r = 0.0
g = 255.0
101.times do
puts <<-TEXT
.heat-map-#{i} {
background-color: rgb(#{r.to_i},#{g.to_i},0) ;
}
TEXT
r += 2.55
g -= 2.55
i += 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment