Skip to content

Instantly share code, notes, and snippets.

@ajself
Created June 28, 2013 19:15
Show Gist options
  • Save ajself/5887293 to your computer and use it in GitHub Desktop.
Save ajself/5887293 to your computer and use it in GitHub Desktop.
randomHSLAColor = ->
getRandomInRange = (min, max) ->
return Math.floor(Math.random() * (max - min + 1)) + min
"hsla(#{getRandomInRange(0, 360)}, #{getRandomInRange(70, 100)}%, #{getRandomInRange(45, 55)}%, 0.6)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment