Created
August 24, 2014 17:45
-
-
Save lcaballero/c36f1da0206cf81b1caf to your computer and use it in GitHub Desktop.
A bit of jquery code to pull rgb colors from Kuler themes.
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
$("div.content").on("click", function(ev) { | |
var s = [] | |
var e = $(this) | |
if (e.is(".content")) { | |
e.find(".frame > div") | |
.each(function(i,e) { | |
var rgb = $(e).css("background-color") | |
.match(/([0-9]+)/g, ',') | |
s.push('[', rgb.join(','), ']', '\n') | |
}) | |
var theme = e.find("ul.assets-item-meta .name > a").text() | |
console.log('theme', theme) | |
console.log(s.join("")) | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment