MCPcopy Index your code
hub / github.com/tapmodo/Jcrop / hue2rgb

Function hue2rgb

js/jquery.color.js:418–430  ·  view source on GitHub ↗
( p, q, h )

Source from the content-addressed store, hash-verified

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 ) {

Callers 1

jquery.color.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected