diff options
| -rw-r--r-- | image.html | 15 | ||||
| -rw-r--r-- | img/sistene-chapel.jpg | bin | 0 -> 624326 bytes | |||
| -rw-r--r-- | js/color_code.js | 39 |
3 files changed, 49 insertions, 5 deletions
@@ -1,5 +1,5 @@ <style> -label { min-width: 40px; display: inline-block; } +label { min-width: 50px; display: inline-block; } </style> <body> <div> @@ -7,17 +7,24 @@ label { min-width: 40px; display: inline-block; } <br> <label for="width_el">width</label> <input type="range" min="1" max="120" value="40" id="width_el"> <span id="width_span"></span>x<span id="height_span"></span> - </br> + <br> <label for="ratio_el">ratio</label> <input type="range" min="0.0" max="8" value="2" step="0.005" id="ratio_el"> - <label for="nn_el">nearest neighbor</label> <input type="checkbox" checked id="nn_el"> - <label for="palette_el">palette</label> + <br> + <label for="palette_el" style="padding-top: 5px;">palette</label> <select id="palette_el"> <option default value="colors">all colors</label> <option value="hues">hues only</label> <option value="grays">grayscale</label> + <option value="reds">reds</label> + <option value="blues">blues</label> </select> + <br> + <label></label> <input type="checkbox" checked id="nn_el"> <label for="nn_el" style="padding-top: 7px;">nearest neighbor</label> + <br> + <br> </div> <div id="image_style"></div> + <br> <input type="text" id="text_style"> </body> diff --git a/img/sistene-chapel.jpg b/img/sistene-chapel.jpg Binary files differnew file mode 100644 index 0000000..919aeae --- /dev/null +++ b/img/sistene-chapel.jpg diff --git a/js/color_code.js b/js/color_code.js index fde398f..e1a4d55 100644 --- a/js/color_code.js +++ b/js/color_code.js @@ -54,7 +54,42 @@ var MircColor = (function(){ [127,127,127], [210,210,210] ] - + var REDS = [ + [255,255,255], + [0,0,0], + null, + null, + [255,0,0], + [127,0,0], + null, + [252,127,0], + [255,255,0], + null, + null, + null, + null, + [255,0,255], + null, + null, + ] + var BLUES = [ + [255,255,255], + [0,0,0], + [0,0,127], + null, + null, + null, + [156,0,156], + null, + null, + [0,252,0], + [0,147,147], + [0,255,255], + [0,0,252], + [255,0,255], + null, + null, + ] var colors = COLORS, recolor_fn = null function set_colors (a) { colors = a @@ -185,6 +220,8 @@ var MircColor = (function(){ colors: COLORS, hues: HUES, grays: GRAYS, + reds: REDS, + blues: BLUES, set_recolor_fn: set_recolor_fn, set_colors: set_colors, closest_to: closest_to, |
