Last active
August 29, 2015 14:05
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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