DIR : /home/kozerus/public_html/pn/uize/site-source/examples/~EXPERIMENTAL-make-color-combinations.html
/home/kozerus/public_html/pn/uize/site-source/examples
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Color Sorting Techniques | JavaScript Examples | UIZE JavaScript Framework</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="keywords" content="Uize.Color.Util"/>
<link rel="alternate" type="application/rss+xml" title="UIZE JavaScript Framework - Latest News" href="http://www.uize.com/latest-news.rss"/>
<link rel="stylesheet" href="../css/page.css"/>
<link rel="stylesheet" href="../css/page.example.css"/>
<style tyle="text/css">
.colorSwatch {
width:80px;
height:9px;
float:left;
}
</style>
</head>
<body>
<script type="text/javascript" src="../js/Uize.js"></script>
<h1 class="header">
<a id="page-homeLink" href="../index.html" title="UIZE JavaScript Framework home"></a>
<a href="../index.html" class="homeLinkText" title="UIZE JavaScript Framework home">UIZE JavaScript Framework</a>
</h1>
<div class="main">
<h1 class="document-title">
<a href="../javascript-examples.html" class="breadcrumb breadcrumbWithArrow">JAVASCRIPT EXAMPLES</a>
Color Sorting Techniques
<div class="pageActionsShell">
<div id="page-actions" class="pageActions"><a href="source-code/make-color-combinations.html" class="buttonLink">SOURCE</a></div>
</div>
</h1>
<!-- explanation copy -->
<div class="explanation">
<p>Blah...</p>
</div>
<!-- wireframe for sortable color swatches -->
<div id="page-colorSwatches" style="width:480px; margin:auto;"></div>
<div style="clear:left;"></div>
</div>
<!-- JavaScript code to generate the color swatches -->
<script type="text/javascript">
Uize.require (
[
'UizeSite.Page.Example.library',
'UizeSite.Page.Example',
'Uize.Color.Util'
],
function () {
'use strict';
/*** create the example page widget ***/
var page = window.page = UizeSite.Page.Example ();
/*** build the swatches HTML ***/
var swatchesHtmlChunks = [];
//var colors = Uize.Color.Util.makeCombinations ('hsl(0,100,20)','hsl(20,70,70)',[6,6,6],[0,0,0]);
var colors = Uize.Color.Util.makeCombinations ('rgb(255,100,50)','rgb(0,50,100)',[6,6,6],[0,0,0]);
for (var colorNo = -1, colorsLength = colors.length; ++colorNo < colorsLength;) {
var colorHex = colors [colorNo].to ('#hex');
swatchesHtmlChunks.push (
'<div class="colorSwatch" style="background:' + colorHex + ';" title="' + colorHex + '"></div>'
);
}
/*** wire up the page widget ***/
page.wireUi ();
page.setNodeInnerHtml ('colorSwatches',swatchesHtmlChunks.join (''));
}
);
</script>
</body>
</html>
//
koh5_pano
Drag mouse to navigate.
Navigation
- Left/Right Mouse drag: Changes camera heading.
- Up/Sown Mouse drag: Changes camera pitch.
- Scroll wheel: Changes camera field of view.
- I-Key: Displays Info panel with canvas size, image size and FPS.
17.Aug.2010, Martin Wengenmayer