(h, s, v)
| 792 | } |
| 793 | |
| 794 | function _hsb2rgb(h, s, v) { |
| 795 | /* Converts the given H,S,B color values to R,G,B (between 0.0-1.0). |
| 796 | */ |
| 797 | if (s == 0) { |
| 798 | return [v, v, v]; |
| 799 | } |
| 800 | h = h % 1 * 6.0; |
| 801 | var i = Math.floor(h); |
| 802 | var f = h - i; |
| 803 | var x = v * (1-s); |
| 804 | var y = v * (1-s * f); |
| 805 | var z = v * (1-s * (1-f)); |
| 806 | if (i > 4) { |
| 807 | return [v, x, y]; |
| 808 | } |
| 809 | return [[v,z,x], [y,v,x], [x,v,z], [x,y,v], [z,x,v]][parseInt(i)]; |
| 810 | } |
| 811 | |
| 812 | function darker(clr, step) { |
| 813 | /* Returns a copy of the color with a darker brightness. |
no outgoing calls
no test coverage detected
searching dependent graphs…