kolor.js
function HSVA_TO_RGBA() {
        var h = this.h();
        var s = this.s();
        var v = this.v();
        var a = this.a();
        var hi = Math.floor(h / 60);
        var f = h / 60 - hi;
        var p = v * (1 - s);
        var q = v * (1 - f * s);
        var t = v * (1 - (1 - f) * s);
        var rgba;

        switch (hi) {
            case 0:
                rgba = [v, t, p, a]; break;
            case 1:
                rgba = [q, v, p, a]; break;
            case 2:
                rgba = [p, v, t, a]; break;
            case 3:
                rgba = [p, q, v, a]; break;
            case 4:
                rgba = [t, p, v, a]; break;
            case 5:
                rgba = [v, p, q, a]; break;
            default:
                rgba = [0, 0, 0, a];
        }

        for (var i = rgba.length - 1; i--;) {
            rgba[i] *= 255;
        }

        return kolor.rgba(rgba);
    }
function HSVA_TO_RGBA() {
        var h = this.h();
        var s = this.s();
        var v = this.v();
        var a = this.a();
        var hi = Math.floor(h / 60);
        var f = h / 60 - hi;
        var p = v * (1 - s);
        var q = v * (1 - f * s);
        var t = v * (1 - (1 - f) * s);
        var rgba;

        switch (hi) {
            case 0:
                rgba = [v, t, p, a]; break;
            case 1:
                rgba = [q, v, p, a]; break;
            case 2:
                rgba = [p, v, t, a]; break;
            case 3:
                rgba = [p, q, v, a]; break;
            case 4:
                rgba = [t, p, v, a]; break;
            case 5:
                rgba = [v, p, q, a]; break;
            default:
                rgba = [0, 0, 0, a];
        }

        for (var i = rgba.length - 1; i--;) {
            rgba[i] *= 255;
        }

        return kolor.rgba(rgba);
    }
function HSVA_TO_RGBA ( ) { var h = this . h ( ) ; var s = this . s ( ) ; var v = this . v ( ) ; var a = this . a ( ) ; var hi = Math . floor ( h / 60 ) ; var f = h / 60 - hi ; var p = v * ( 1 - s ) ; var q = v * ( 1 - f * s ) ; var t = v * ( 1 - ( 1 - f ) * s ) ; var rgba ; switch ( hi ) { case 0 : rgba = [ v , t , p , a ] ; break ; case 1 : rgba = [ q , v , p , a ] ; break ; case 2 : rgba = [ p , v , t , a ] ; break ; case 3 : rgba = [ p , q , v , a ] ; break ; case 4 : rgba = [ t , p , v , a ] ; break ; case 5 : rgba = [ v , p , q , a ] ; break ; default : rgba = [ 0 , 0 , 0 , a ] ; } for ( var i = rgba . length - 1 ; i -- ; ) { rgba [ i ] *= 255 ; } return kolor . rgba ( rgba ) ; }
Converts HSVA color to RGBA.
Converts HSVA color to RGBA .