Skip to content

Instantly share code, notes, and snippets.

@lerouxb
Last active August 29, 2015 14:05
Show Gist options
  • Select an option

  • Save lerouxb/5211f4cb386dca1f3f34 to your computer and use it in GitHub Desktop.

Select an option

Save lerouxb/5211f4cb386dca1f3f34 to your computer and use it in GitHub Desktop.
Calculate hex values for 20 shades of gray starting at exactly #ffffff and ending at #000000
for i in [19..0]
xx = Math.round(255/19*i).toString(16)
xx = '0'+xx if xx.length == 1
console.log "##{xx}#{xx}#{xx}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment