MCPcopy Create free account
hub / github.com/TruthHun/DocHub / hue2rgb

Function hue2rgb

static/Home/default/js/flat-ui.js:3035–3047  ·  view source on GitHub ↗
( p, q, h )

Source from the content-addressed store, hash-verified

3033// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
3034
3035function hue2rgb( p, q, h ) {
3036 h = ( h + 1 ) % 1;
3037 if ( h * 6 < 1 ) {
3038 return p + (q - p) * h * 6;
3039 }
3040 if ( h * 2 < 1) {
3041 return q;
3042 }
3043 if ( h * 3 < 2 ) {
3044 return p + (q - p) * ((2/3) - h) * 6;
3045 }
3046 return p;
3047}
3048
3049spaces.hsla.to = function ( rgba ) {
3050 if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {

Callers 1

flat-ui.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected