Hexcode Analyzer
A small prototype for the hexcode analyzer/generator that will be used in the Chunks web game.
by japaneselanguagefriend
HTML
<ul>
<li style="background:#ffcc00;"></li>
<li style="background:#112233;"></li>
<li style="background:#11ddee;"></li>
</ul>
<div id="output"></div>
CSS
body {padding:10px;}
ul {margin:0px 0px 10px 0px; overflow:hidden;}
li {height:25px; width:25px; float:left; display:block;}
#output {padding:10px; background:#eee; border:1px solid #ccc;}
JavaScript
var hexes = [];
$('li').each(function() {
hexes.push($(this).css('background-color'));
});
for (i = 0; i<hexes.length; i++) {
//hexes = items.css('background-color');
//console.log(items[i]);
$('#output').append(hexes[i]);
}