Skip to content

Instantly share code, notes, and snippets.

@noeldelgado
Last active December 15, 2015 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noeldelgado/5328615 to your computer and use it in GitHub Desktop.
Save noeldelgado/5328615 to your computer and use it in GitHub Desktop.
generates an array with the full list of safe-web-colours
var colors = [],
pattern = ["0","3","6","9","c","f"],
plength = pattern.length,
a, b, c;
for (a = 0; a < plength; a += 1) {
for (b = 0; b < plength; b += 1) {
for (c = 0; c < plength; c += 1) {
colors.push( pattern[a]+pattern[a] + pattern[b]+pattern[b] + pattern[c]+pattern[c] );
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment