lib/toxi/color/ColorRange.js
function( rc ){
            if( is.ColorRange(rc) ){
                addAll(this.hueConstraint, rc.hueConstraint);
                addAll(this.saturationConstraint, rc.saturationConstraint);
                addAll(this.brightnessConstraint, rc.brightnessConstraint);
                addAll(this.alphaConstraint, rc.alphaConstraint);
                this.black.min = Math.min( this.black.min, rc.black.min );
                this.black.max = Math.max( this.black.max, rc.black.max );
                this.white.min = Math.min( this.white.min, rc.white.min );
                this.white.max = Math.max( this.white.max, rc.white.max );
            } else {
                this.hueConstraint.push( new FloatRange(rc.hue(),rc.hue()) );
                this.saturationConstraint.push( new FloatRange(rc.saturation(),rc.saturation()) );
                this.brightnessConstraint.push( new FloatRange(rc.brightness(),rc.brightness()) );
                this.alphaConstraint.push( new FloatRange(rc.alpha(),rc.alpha()) );
            }
            return this;
        }
function( rc ){
            if( is.ColorRange(rc) ){
                addAll(this.hueConstraint, rc.hueConstraint);
                addAll(this.saturationConstraint, rc.saturationConstraint);
                addAll(this.brightnessConstraint, rc.brightnessConstraint);
                addAll(this.alphaConstraint, rc.alphaConstraint);
                this.black.min = Math.min( this.black.min, rc.black.min );
                this.black.max = Math.max( this.black.max, rc.black.max );
                this.white.min = Math.min( this.white.min, rc.white.min );
                this.white.max = Math.max( this.white.max, rc.white.max );
            } else {
                this.hueConstraint.push( new FloatRange(rc.hue(),rc.hue()) );
                this.saturationConstraint.push( new FloatRange(rc.saturation(),rc.saturation()) );
                this.brightnessConstraint.push( new FloatRange(rc.brightness(),rc.brightness()) );
                this.alphaConstraint.push( new FloatRange(rc.alpha(),rc.alpha()) );
            }
            return this;
        }
function ( rc ) { if ( is . ColorRange ( rc ) ) { addAll ( this . hueConstraint , rc . hueConstraint ) ; addAll ( this . saturationConstraint , rc . saturationConstraint ) ; addAll ( this . brightnessConstraint , rc . brightnessConstraint ) ; addAll ( this . alphaConstraint , rc . alphaConstraint ) ; this . black . min = Math . min ( this . black . min , rc . black . min ) ; this . black . max = Math . max ( this . black . max , rc . black . max ) ; this . white . min = Math . min ( this . white . min , rc . white . min ) ; this . white . max = Math . max ( this . white . max , rc . white . max ) ; } else { this . hueConstraint . push ( new FloatRange ( rc . hue ( ) , rc . hue ( ) ) ) ; this . saturationConstraint . push ( new FloatRange ( rc . saturation ( ) , rc . saturation ( ) ) ) ; this . brightnessConstraint . push ( new FloatRange ( rc . brightness ( ) , rc . brightness ( ) ) ) ; this . alphaConstraint . push ( new FloatRange ( rc . alpha ( ) , rc . alpha ( ) ) ) ; } return this ; }
Adds the HSV color components as constraints
@param {toxi.color.ColorRange | toxi.color.TColor} rc
@return itself
Adds the HSV color components as constraints