Created
March 21, 2013 03:41
-
-
Save armoucar/5210520 to your computer and use it in GitHub Desktop.
javascript red to green
This file contains 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
var arr = [], hexa; | |
for (i = 0; i < 255; i += 51) { | |
hexa = "#ff" + Number(i).toString(16) + "00"; | |
console.log(hexa); | |
arr.push(hexa); | |
} | |
for (i = 255; i > 0; i -= 51) { | |
hexa = "#" + Number(i).toString(16) + "ff00"; | |
console.log(hexa); | |
arr.push(hexa); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment