( p, q, h )
| 416 | // http://www.google.com/codesearch/p#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/inspector/front-end/Color.js&d=7&l=193 |
| 417 | |
| 418 | function hue2rgb( p, q, h ) { |
| 419 | h = ( h + 1 ) % 1; |
| 420 | if ( h * 6 < 1 ) { |
| 421 | return p + (q - p) * 6 * h; |
| 422 | } |
| 423 | if ( h * 2 < 1) { |
| 424 | return q; |
| 425 | } |
| 426 | if ( h * 3 < 2 ) { |
| 427 | return p + (q - p) * ((2/3) - h) * 6; |
| 428 | } |
| 429 | return p; |
| 430 | } |
| 431 | |
| 432 | spaces.hsla.to = function ( rgba ) { |
| 433 | if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { |