Skip to content

Instantly share code, notes, and snippets.

@armoucar
Created March 21, 2013 03:41
Show Gist options
  • Save armoucar/5210520 to your computer and use it in GitHub Desktop.
Save armoucar/5210520 to your computer and use it in GitHub Desktop.
javascript red to green
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