Skip to content

Instantly share code, notes, and snippets.

@foo9
Created March 16, 2013 03:02
Show Gist options
  • Select an option

  • Save foo9/5174743 to your computer and use it in GitHub Desktop.

Select an option

Save foo9/5174743 to your computer and use it in GitHub Desktop.
var palette = {
"Butter": ["#fce94f", "#edd400", "#c4a000"],
"Orange": ["#fcaf3e", "#f57900", "#ce5c00"],
"Chocolate": ["#e9b96e", "#c17d11", "#8f5902"],
"Chameleon": ["#8ae234", "#73d216", "#4e9a06"],
"Sky Blue": ["#729fcf", "#3465a4", "#204a87"],
"Plum": ["#ad7fa8", "#75507b", "#5c3566"],
"Scarlet Red": ["#ef2929", "#cc0000", "#a40000"]
};
// test
var list, color;
for (var name in palette) {
list = palette[name];
for (var i = 0, iz = list.length; i < iz; i++) {
color = list[i];
$("body").append($("<div />").css({
background: color,
}).text(name + " " + color));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment