Difference between revisions of "The HSV color scheme"

From JSXGraph Wiki
Jump to navigationJump to search
Line 1: Line 1:
 +
The HSV color scheme consists of three values:
 +
* Hue (base color): between 0 and 360
 +
* Saturation (purity): between 0 and 1
 +
* Value (brightness): between 0 and 1
 
<jsxgraph width=600 height=500>
 
<jsxgraph width=600 height=500>
 
var brd = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-2,4,8,-4]});
 
var brd = JXG.JSXGraph.initBoard('jxgbox', {boundingbox:[-2,4,8,-4]});
Line 4: Line 8:
 
var S = brd.createElement('slider',[[0,3],[5,3],[0,0.8,1]], {name:'S'});
 
var S = brd.createElement('slider',[[0,3],[5,3],[0,0.8,1]], {name:'S'});
 
var V = brd.createElement('slider',[[0,2.5],[5,2.5],[0,0.7,1]], {name:'V'});
 
var V = brd.createElement('slider',[[0,2.5],[5,2.5],[0,0.7,1]], {name:'V'});
 
+
var rct = brd.createElement('polygon',[[0,0],[0,1],[1,1],[1,0]]);
 
</jsxgraph>
 
</jsxgraph>

Revision as of 16:16, 11 August 2009

The HSV color scheme consists of three values:

  • Hue (base color): between 0 and 360
  • Saturation (purity): between 0 and 1
  • Value (brightness): between 0 and 1