static gradient(oPalette) {
        let aPalette = [];
        let sColor;
        let sLastColor = null;
        let nPal;
        let nLastPal = 0;
        for (let iPal in oPalette) {
            nPal = iPal | 0;
            sColor = oPalette[iPal];
            if (sLastColor !== null) {
                aPalette = aPalette.concat(Rainbow.spectrum(sLastColor, sColor, nPal - nLastPal + 1).slice(1));
            } else {
                aPalette[nPal] = this.rgba(sColor);
            }
            sLastColor = sColor;
            nLastPal = nPal;
        }
        return aPalette;
    }
/**
     * Generates a gradient
     * @param oPalette {*} palette definition
     * The palette is an object with key:value pairs.
     * - The keys are color indices
     * - The values are color values
     * Rainbow.gradient({
     * 		start: value,
     * 		stop1: value,
     * 		stop2: value,
     * 		...
     * 		stopN: value,
     * 		end: value
     * })
     * @example
     * Rainbow.gradient({
     * 		0: '#00F',
     * 		50: '#FF0',
     * 		100: '#F00'
     * })
     */
Generates a gradient
@param oPalette {*} palette definition
The palette is an object with key:value pairs.
Generates a gradient @param oPalette { * } palette definition The palette is an object with key : value pairs .
static gradient(oPalette) {
        let aPalette = [];
        let sColor;
        let sLastColor = null;
        let nPal;
        let nLastPal = 0;
        for (let iPal in oPalette) {
            nPal = iPal | 0;
            sColor = oPalette[iPal];
            if (sLastColor !== null) {
                aPalette = aPalette.concat(Rainbow.spectrum(sLastColor, sColor, nPal - nLastPal + 1).slice(1));
            } else {
                aPalette[nPal] = this.rgba(sColor);
            }
            sLastColor = sColor;
            nLastPal = nPal;
        }
        return aPalette;
    }
static gradient ( oPalette ) { let aPalette = [ ] ; let sColor ; let sLastColor = null ; let nPal ; let nLastPal = 0 ; for ( let iPal in oPalette ) { nPal = iPal | 0 ; sColor = oPalette [ iPal ] ; if ( sLastColor !== null ) { aPalette = aPalette . concat ( Rainbow . spectrum ( sLastColor , sColor , nPal - nLastPal + 1 ) . slice ( 1 ) ) ; } else { aPalette [ nPal ] = this . rgba ( sColor ) ; } sLastColor = sColor ; nLastPal = nPal ; } return aPalette ; }
Generates a gradient
 @param oPalette {*} palette definition
 The palette is an object with key:value pairs.
Generates a gradient @param oPalette { * } palette definition The palette is an object with key : value pairs .