mirror of
https://github.com/janishutz/color-thief.git
synced 2025-11-25 22:04:25 +00:00
45 lines
1.3 KiB
HTML
Executable File
45 lines
1.3 KiB
HTML
Executable File
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<title>Color Thief</title>
|
|
<link rel="stylesheet" href="examples/css/screen.css">
|
|
</head>
|
|
<body>
|
|
|
|
<div id="example-images"></div>
|
|
|
|
<script id='image-tpl' type='text/x-mustache'>
|
|
{{#.}}
|
|
<div class="image-section">
|
|
<img class="image" src="examples/img/{{.}}" />
|
|
<div class="output"></div>
|
|
</div>
|
|
{{/.}}
|
|
</script>
|
|
|
|
<script id="output-tpl" type="text/x-mustache">
|
|
<div class="get-color">
|
|
<h2>Dominant Color</h3>
|
|
<div class="swatches"></div>
|
|
<code>colorThief.getColor(image):{{elapsedTimeForGetColor}}ms</code>
|
|
</div>
|
|
<div class="get-palette">
|
|
<h2>Palette</h3>
|
|
<div class="swatches">
|
|
{{#palette}}
|
|
<div class="swatch" style="background-color: rgb({{0}}, {{1}}, {{2}})"></div>
|
|
{{/palette}}
|
|
</div>
|
|
<code>colorThief.getPalette(image):{{elapsedTimeForGetPalette}}ms</code>
|
|
</div>
|
|
</script>
|
|
|
|
<script src="src/color-thief.js"></script>
|
|
<script src="examples/js/mustache.js"></script>
|
|
<script src="examples/js/demo.js"></script>
|
|
|
|
</body>
|
|
</html>
|