Files
color-thief/index.html
2012-12-21 13:47:34 -06:00

86 lines
2.5 KiB
HTML
Executable File

<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link href='http://fonts.googleapis.com/css?family=Varela+Round|Terminal+Dosis:400,700,600' rel='stylesheet' type='text/css'>
<title>Color Thief</title>
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="css/app.css">
<script src="js/libs/modernizr-2.0.6.min.js"></script>
</head>
<body>
<div id="container">
<header>
<h1>Color Thief</h1>
<h4><a href="http://lokeshdhakar.com">by Lokesh Dhakar</a></small></h4>
<p>A script for grabbing the dominant color or color palette from an image. Uses Javascript and the canvas tag to make it happen.</p>
<p><a href="http://www.lokeshdhakar.com/color-thief/">Read more on my blog</a> | <a href="https://github.com/lokesh/color-thief">Get the code on Github</a>
</p>
</header>
<div id="main" role="main">
<h2>Test it out</h2>
<div class="imageSection">
<div id="dropZone" class="imageWrap">
</div>
<div class="colors">
<div class="function dominantColor">
<h3>Dominant Color</h3>
<div class="swatches"></div>
</div>
<div class="function medianCutPalette clearfix">
<h3>Palette</h3>
<div class="swatches"></div>
</div>
</div>
</div>
<h2>Examples</h2>
</div>
</div> <!--! end of #container -->
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.8.3.min.js"><\/script>')</script>
<script src="js/libs/jquery.lettering.js"></script>
<script src="js/libs/mustache.js"></script>
<script src="js/libs/quantize.js"></script>
<script src="js/color-thief.js"></script>
<!-- Using Mustache templating -->
<script id='template' type='text/x-mustache'>
{{#images}}
<div class="imageSection {{class}} ">
<div class="imageWrap">
<img class="targetImage" src="img/{{file}}" data-colorcount="{{colorCount}}" />
</div>
<div class="colors">
<div class="function dominantColor">
<h3>Dominant Color</h3>
<div class="swatches"></div>
</div>
<div class="function medianCutPalette clearfix">
<h3>Palette</h3>
<div class="swatches"></div>
</div>
</div>
</div>
{{/images}}
</script>
<script src="index.js"></script>
</body>
</html>