---
title: "ColorRamp | Weather SDK | JavaScript maps SDK"
description: "Documentation for Weather JS"
---

# Class ColorRamp

#### Hierarchy

-   Array<[ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\>
    -   ColorRamp

#### Indexable

-   \[n: number\]: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)
    

##### Index

### Constructors

[constructor](#constructor)

### Properties

[\[unscopables\]](#unscopables) [length](#length) [\[species\]](#species) [builtin](#builtin)

### Methods

[\[iterator\]](#iterator) [at](#at) [clone](#clone) [concat](#concat) [copyWithin](#copywithin) [entries](#entries) [every](#every) [fill](#fill) [filter](#filter) [find](#find) [findIndex](#findindex) [flat](#flat) [flatMap](#flatmap) [forEach](#foreach) [getBounds](#getbounds) [getCanvasStrip](#getcanvasstrip) [getColor](#getcolor) [getRawColorStops](#getrawcolorstops) [includes](#includes) [indexOf](#indexof) [join](#join) [keys](#keys) [lastIndexOf](#lastindexof) [map](#map) [pop](#pop) [push](#push) [reduce](#reduce) [reduceRight](#reduceright) [reverse](#reverse) [scale](#scale) [setStops](#setstops) [shift](#shift) [slice](#slice) [some](#some) [sort](#sort) [splice](#splice) [toLocaleString](#tolocalestring) [toString](#tostring) [unshift](#unshift) [values](#values) [from](#from) [fromArrayDefinition](#fromarraydefinition) [isArray](#isarray) [of](#of)

## Constructors

### constructor[](#constructor)

-   new ColorRamp(options?: [ColorRampOptions](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/ColorRampOptions/)): ColorRamp[](#constructorcolorramp)
    
    #### Parameters
    
    -   `Optional`options: [ColorRampOptions](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/ColorRampOptions/)
    
    #### Returns ColorRamp
    
    Overrides Array<ColorStop>.constructor
    

## Properties

### `Readonly`\[unscopables\][](#unscopables)

"\[unscopables\]": {  
    "\[iterator\]"?: boolean;  
    "\[unscopables\]"?: boolean;  
    at?: boolean;  
    concat?: boolean;  
    copyWithin?: boolean;  
    entries?: boolean;  
    every?: boolean;  
    fill?: boolean;  
    filter?: boolean;  
    find?: boolean;  
    findIndex?: boolean;  
    flat?: boolean;  
    flatMap?: boolean;  
    forEach?: boolean;  
    includes?: boolean;  
    indexOf?: boolean;  
    join?: boolean;  
    keys?: boolean;  
    lastIndexOf?: boolean;  
    length?: boolean;  
    map?: boolean;  
    pop?: boolean;  
    push?: boolean;  
    reduce?: boolean;  
    reduceRight?: boolean;  
    reverse?: boolean;  
    shift?: boolean;  
    slice?: boolean;  
    some?: boolean;  
    sort?: boolean;  
    splice?: boolean;  
    toLocaleString?: boolean;  
    toString?: boolean;  
    unshift?: boolean;  
    values?: boolean;  
    \[key: number\]: boolean | undefined;  
}

Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement.

#### Type Declaration

-   ##### \[key: number\]: boolean | undefined
    
-   ##### `Optional`\[iterator\]?: boolean
    
-   ##### `Optional` `Readonly`\[unscopables\]?: boolean
    
    Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement.
    
-   ##### `Optional`at?: boolean
    
-   ##### `Optional`concat?: boolean
    
-   ##### `Optional`copyWithin?: boolean
    
-   ##### `Optional`entries?: boolean
    
-   ##### `Optional`every?: boolean
    
-   ##### `Optional`fill?: boolean
    
-   ##### `Optional`filter?: boolean
    
-   ##### `Optional`find?: boolean
    
-   ##### `Optional`findIndex?: boolean
    
-   ##### `Optional`flat?: boolean
    
-   ##### `Optional`flatMap?: boolean
    
-   ##### `Optional`forEach?: boolean
    
-   ##### `Optional`includes?: boolean
    
-   ##### `Optional`indexOf?: boolean
    
-   ##### `Optional`join?: boolean
    
-   ##### `Optional`keys?: boolean
    
-   ##### `Optional`lastIndexOf?: boolean
    
-   ##### `Optional`length?: boolean
    
    Gets or sets the length of the array. This is a number one higher than the highest index in the array.
    
-   ##### `Optional`map?: boolean
    
-   ##### `Optional`pop?: boolean
    
-   ##### `Optional`push?: boolean
    
-   ##### `Optional`reduce?: boolean
    
-   ##### `Optional`reduceRight?: boolean
    
-   ##### `Optional`reverse?: boolean
    
-   ##### `Optional`shift?: boolean
    
-   ##### `Optional`slice?: boolean
    
-   ##### `Optional`some?: boolean
    
-   ##### `Optional`sort?: boolean
    
-   ##### `Optional`splice?: boolean
    
-   ##### `Optional`toLocaleString?: boolean
    
-   ##### `Optional`toString?: boolean
    
-   ##### `Optional`unshift?: boolean
    
-   ##### `Optional`values?: boolean
    

Inherited from Array.\[unscopables\]

### length[](#length)

length: number

Gets or sets the length of the array. This is a number one higher than the highest index in the array.

Inherited from Array.length

### `Static` `Readonly`\[species\][](#species)

"\[species\]": ArrayConstructor

Inherited from Array.\[species\]

### `Static`builtin[](#builtin)

builtin: {  
    AUTOMN: ColorRamp;  
    BATHYMETRY: ColorRamp;  
    BLACKBODY: ColorRamp;  
    BLUERED: ColorRamp;  
    BONE: ColorRamp;  
    CDOM: ColorRamp;  
    CHLOROPHYLL: ColorRamp;  
    CIVIDIS: ColorRamp;  
    COOL: ColorRamp;  
    COPPER: ColorRamp;  
    CUBEHELIX: ColorRamp;  
    DENSITY: ColorRamp;  
    EARTH: ColorRamp;  
    ELECTRIC: ColorRamp;  
    FREESURFACE\_BLUE: ColorRamp;  
    FREESURFACE\_RED: ColorRamp;  
    GREENS: ColorRamp;  
    GREYS: ColorRamp;  
    HOT: ColorRamp;  
    HSV: ColorRamp;  
    INFERNO: ColorRamp;  
    JET: ColorRamp;  
    MAGMA: ColorRamp;  
    MAKO: ColorRamp;  
    MAKO\_PRECIPITATION: ColorRamp;  
    NULL: ColorRamp;  
    OXYGEN: ColorRamp;  
    PAR: ColorRamp;  
    PHASE: ColorRamp;  
    PICNIC: ColorRamp;  
    PLASMA: ColorRamp;  
    PORTLAND: ColorRamp;  
    PRECIPITATION: ColorRamp;  
    PRECIPITATION\_2: ColorRamp;  
    PRESSURE: ColorRamp;  
    PRESSURE\_2: ColorRamp;  
    PRESSURE\_3: ColorRamp;  
    PRESSURE\_4: ColorRamp;  
    PRESSURE\_CIVIDIS: ColorRamp;  
    RADAR: ColorRamp;  
    RADAR\_CLOUD: ColorRamp;  
    RADAR\_ROCKET: ColorRamp;  
    RAINBOW: ColorRamp;  
    RAINBOW\_SOFT: ColorRamp;  
    RDBU: ColorRamp;  
    ROCKET: ColorRamp;  
    SALINITY: ColorRamp;  
    SPRING: ColorRamp;  
    SUMMER: ColorRamp;  
    TEMPERATURE: ColorRamp;  
    TEMPERATURE\_2: ColorRamp;  
    TEMPERATURE\_3: ColorRamp;  
    TEMPERATURE\_TURBO: ColorRamp;  
    TERRAIN: ColorRamp;  
    TURBIDITY: ColorRamp;  
    TURBO: ColorRamp;  
    VELOCITY\_BLUE: ColorRamp;  
    VELOCITY\_GREEN: ColorRamp;  
    VIRIDIS: ColorRamp;  
    WARM: ColorRamp;  
    WIND\_ROCKET: ColorRamp;  
    WINTER: ColorRamp;  
    YIGNBU: ColorRamp;  
    YIORRD: ColorRamp;  
}

#### Type Declaration

-   ##### AUTOMN: ColorRamp
    
    Classic autommn color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### BATHYMETRY: ColorRamp
    
    Classic bathymetry color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### BLACKBODY: ColorRamp
    
    Classic blackbody color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### BLUERED: ColorRamp
    
    Classic blue-red color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### BONE: ColorRamp
    
    Classic bone color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### CDOM: ColorRamp
    
    Classic cdom color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### CHLOROPHYLL: ColorRamp
    
    Classic chlorophyll color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### CIVIDIS: ColorRamp
    
    The cividis color ramp is color blind friendly. Read more here [https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0199239](https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0199239) Defined in interval \[0, 1\], without unit.
    
-   ##### COOL: ColorRamp
    
    Classic cool color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### COPPER: ColorRamp
    
    Classic copper color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### CUBEHELIX: ColorRamp
    
    Classic cube helix color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### DENSITY: ColorRamp
    
    Classic density color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### EARTH: ColorRamp
    
    Classic earth color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### ELECTRIC: ColorRamp
    
    Classic electric color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### FREESURFACE\_BLUE: ColorRamp
    
    Classic freesurface blue color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### FREESURFACE\_RED: ColorRamp
    
    Classic freesurface red color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### GREENS: ColorRamp
    
    Classic greens color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### GREYS: ColorRamp
    
    Classic greys color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### HOT: ColorRamp
    
    Classic hot color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### HSV: ColorRamp
    
    Classic HSV color ramp (hue, saturation, value). Defined in interval \[0, 1\], without unit.
    
-   ##### INFERNO: ColorRamp
    
    Classic inferno color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### JET: ColorRamp
    
    Classic jet color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### MAGMA: ColorRamp
    
    Classic magma color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### MAKO: ColorRamp
    
    The mako color ramp is perceptually uniform and can be seen as a color blind friendly alternative to bathymetry or yignbu. Defined in interval \[0, 1\], without unit.
    
-   ##### MAKO\_PRECIPITATION: ColorRamp
    
    This mako color ramps is scale for precipitation is a color blind friendly alternative. Values are in mm/hour Defined in interval \[0, 50\].
    
-   ##### NULL: ColorRamp
    
    A fully transparent \[0, 0, 0, 0\] colorramp to hide data. Defined in interval \[0, 1\], without unit.
    
-   ##### OXYGEN: ColorRamp
    
    Classic oxygen color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### PAR: ColorRamp
    
    Classic par color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### PHASE: ColorRamp
    
    Classic phase color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### PICNIC: ColorRamp
    
    Classic picnic color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### PLASMA: ColorRamp
    
    Classic plasma color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### PORTLAND: ColorRamp
    
    Classic Portland color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### PRECIPITATION: ColorRamp
    
    Precipitation in mm per hour. Defined in interval \[0, 50\].
    
-   ##### PRECIPITATION\_2: ColorRamp
    
    precipitation in mm per hour. Defined in interval \[0, 50\].
    
-   ##### PRESSURE: ColorRamp
    
    Atmospheric pressure, values in hPa (or millibar) Defined in interval \[900, 1080\].
    
-   ##### PRESSURE\_2: ColorRamp
    
    Atmospheric pressure, values in hPa (or millibar). Defined in interval \[900, 1080\].
    
-   ##### PRESSURE\_3: ColorRamp
    
    Atmospheric pressure, values in hPa (or millibar). Defined in interval \[900, 1080\].
    
-   ##### PRESSURE\_4: ColorRamp
    
    Atmospheric pressure, values in hPa (or millibar). Defined in interval \[900, 1080\]. The main difference with PRESSURE\_3 is the true neutral zone (pale gray) from 1012.5 to 1013.5hPa
    
-   ##### PRESSURE\_CIVIDIS: ColorRamp
    
    This atmospheric pressure color ramp is based on cividis, hence it is more clor bliend friendly. Values are in hPa (or millibar). Defined in interval \[900, 1080\].
    
-   ##### RADAR: ColorRamp
    
    Radar color ramp from NOAA in dBZ. Defined in interval \[0, 75\].
    
-   ##### RADAR\_CLOUD: ColorRamp
    
    Intended to be used with Radar data to create a slighly blue-tinted greyscale to represent cloud coverage. Values are in dBZ. Defined in interval \[4, 60\].
    
-   ##### RADAR\_ROCKET: ColorRamp
    
    This rocket color ramp scaled for radar data is a color blind friendly alternative. Values are in dBZ. Defined in interval \[0, 75\]
    
-   ##### RAINBOW: ColorRamp
    
    Classic rainbow color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### RAINBOW\_SOFT: ColorRamp
    
    Classic rainboz soft color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### RDBU: ColorRamp
    
    Classic rdbu color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### ROCKET: ColorRamp
    
    The rocket color ramp is perceptually uniform, which makes it more color bliend friendly than the classic magma color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### SALINITY: ColorRamp
    
    Classic salinity color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### SPRING: ColorRamp
    
    Classic spring color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### SUMMER: ColorRamp
    
    Classic summer color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### TEMPERATURE: ColorRamp
    
    Classic temperature color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### TEMPERATURE\_2: ColorRamp
    
    Temperatures in degree Celsius. Defined in interval \[-70.15, 46.85\].
    
-   ##### TEMPERATURE\_3: ColorRamp
    
    Temperatures in degrees Celsius. Defined in interval \[-65, 55\].
    
-   ##### TEMPERATURE\_TURBO: ColorRamp
    
    Based on the turbo color ramp, this one is scaled to render temperatures in degree Celcius. This is a perceptually uniform alternative to jet, making it more color bliend friendly. Defined in interval \[-65, 55\].
    
-   ##### TERRAIN: ColorRamp
    
    Elevation terrain, values are in meter. Defined in interval \[-10001, 8000\].
    
-   ##### TURBIDITY: ColorRamp
    
    Classic turbidity color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### TURBO: ColorRamp
    
    Classic turbo color ramp. This is a luminance-constant alternative to the jet, making it more clor-blind friendly. Defined in interval \[0, 1\], without unit.
    
-   ##### VELOCITY\_BLUE: ColorRamp
    
    Classic velocity blue color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### VELOCITY\_GREEN: ColorRamp
    
    Classic velocity green color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### VIRIDIS: ColorRamp
    
    Classic viridis color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### WARM: ColorRamp
    
    Classic warm color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### WIND\_ROCKET: ColorRamp
    
    This rocket color ramp scaled for wind speed is a color blind friendly alternative. Values are in m/sec. Defined in interval \[0, 30\]
    
-   ##### WINTER: ColorRamp
    
    Classic winter color ramp. Defined in interval \[0, 1\], without unit.
    
-   ##### YIGNBU: ColorRamp
    
    Classic yignbu color ramp (blue to light yellow). Defined in interval \[0, 1\], without unit.
    
-   ##### YIORRD: ColorRamp
    
    Classic yiorrd color ramp (red to light yellow). Defined in interval \[0, 1\], without unit.
    

## Methods

### \[iterator\][](#iterator)

-   "\[iterator\]"(): ArrayIterator<[ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\>[](#iterator-1)
    
    Iterator
    
    #### Returns ArrayIterator<[ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\>
    
    Inherited from Array.\[iterator\]
    

### at[](#at)

-   at(pos: number): [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)[](#at-1)
    
    #### Parameters
    
    -   pos: number
    
    #### Returns [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)
    
    Overrides Array.at
    

### clone[](#clone)

-   clone(): ColorRamp[](#clone-1)
    
    #### Returns ColorRamp
    

### concat[](#concat)

-   concat(...items: ConcatArray<[ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\>\[\]): [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\][](#concat-1)
    
    Combines two or more arrays. This method returns a new array without modifying any existing arrays.
    
    #### Parameters
    
    -   ...items: ConcatArray<[ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\>\[\]
        
        Additional arrays and/or items to add to the end of the array.
        
    
    #### Returns [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]
    
    Inherited from Array.concat
    
-   concat(...items: ([ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/) | ConcatArray<[ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\>)\[\]): [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\][](#concat-2)
    
    Combines two or more arrays. This method returns a new array without modifying any existing arrays.
    
    #### Parameters
    
    -   ...items: ([ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/) | ConcatArray<[ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\>)\[\]
        
        Additional arrays and/or items to add to the end of the array.
        
    
    #### Returns [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]
    
    Inherited from Array.concat
    

### copyWithin[](#copywithin)

-   copyWithin(target: number, start: number, end?: number): this[](#copywithin-1)
    
    Returns the this object after copying a section of the array identified by start and end to the same array starting at position target
    
    #### Parameters
    
    -   target: number
        
        If target is negative, it is treated as length+target where length is the length of the array.
        
    -   start: number
        
        If start is negative, it is treated as length+start. If end is negative, it is treated as length+end.
        
    -   `Optional`end: number
        
        If not specified, length of the this object is used as its default value.
        
    
    #### Returns this
    
    Inherited from Array.copyWithin
    

### entries[](#entries)

-   entries(): ArrayIterator<\[number, [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\]\>[](#entries-1)
    
    Returns an iterable of key, value pairs for every entry in the array
    
    #### Returns ArrayIterator<\[number, [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\]\>
    
    Inherited from Array.entries
    

### every[](#every)

-   every<[S](#everys) extends [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\>(  
        predicate: (  
            value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            index: number,  
            array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> value is [S](#everys),  
        thisArg?: any,  
    ): this is [S](#everys)\[\][](#every-1)
    
    Determines whether all the members of an array satisfy the specified test.
    
    #### Type Parameters
    
    -   S extends [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)
    
    #### Parameters
    
    -   predicate: (value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/), index: number, array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]) \=> value is [S](#everys)
        
        A function that accepts up to three arguments. The every method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.
        
    -   `Optional`thisArg: any
        
        An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
        
    
    #### Returns this is [S](#everys)\[\]
    
    Inherited from Array.every
    
-   every(  
        predicate: (  
            value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            index: number,  
            array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> unknown,  
        thisArg?: any,  
    ): boolean[](#every-2)
    
    Determines whether all the members of an array satisfy the specified test.
    
    #### Parameters
    
    -   predicate: (value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/), index: number, array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]) \=> unknown
        
        A function that accepts up to three arguments. The every method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.
        
    -   `Optional`thisArg: any
        
        An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
        
    
    #### Returns boolean
    
    Inherited from Array.every
    

### fill[](#fill)

-   fill(value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/), start?: number, end?: number): this[](#fill-1)
    
    Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
    
    #### Parameters
    
    -   value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)
        
        value to fill array section with
        
    -   `Optional`start: number
        
        index to start filling the array at. If start is negative, it is treated as length+start where length is the length of the array.
        
    -   `Optional`end: number
        
        index to stop filling the array at. If end is negative, it is treated as length+end.
        
    
    #### Returns this
    
    Inherited from Array.fill
    

### filter[](#filter)

-   filter<[S](#filters) extends [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\>(  
        predicate: (  
            value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            index: number,  
            array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> value is [S](#filters),  
        thisArg?: any,  
    ): [S](#filters)\[\][](#filter-1)
    
    Returns the elements of an array that meet the condition specified in a callback function.
    
    #### Type Parameters
    
    -   S extends [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)
    
    #### Parameters
    
    -   predicate: (value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/), index: number, array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]) \=> value is [S](#filters)
        
        A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
        
    -   `Optional`thisArg: any
        
        An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
        
    
    #### Returns [S](#filters)\[\]
    
    Inherited from Array.filter
    
-   filter(  
        predicate: (  
            value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            index: number,  
            array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> unknown,  
        thisArg?: any,  
    ): [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\][](#filter-2)
    
    Returns the elements of an array that meet the condition specified in a callback function.
    
    #### Parameters
    
    -   predicate: (value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/), index: number, array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]) \=> unknown
        
        A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
        
    -   `Optional`thisArg: any
        
        An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
        
    
    #### Returns [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]
    
    Inherited from Array.filter
    

### find[](#find)

-   find<[S](#finds) extends [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\>(  
        predicate: (  
            value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            index: number,  
            obj: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> value is [S](#finds),  
        thisArg?: any,  
    ): [S](#finds) | undefined[](#find-1)
    
    Returns the value of the first element in the array where predicate is true, and undefined otherwise.
    
    #### Type Parameters
    
    -   S extends [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)
    
    #### Parameters
    
    -   predicate: (value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/), index: number, obj: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]) \=> value is [S](#finds)
        
        find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.
        
    -   `Optional`thisArg: any
        
        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.
        
    
    #### Returns [S](#finds) | undefined
    
    Inherited from Array.find
    
-   find(  
        predicate: (  
            value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            index: number,  
            obj: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> unknown,  
        thisArg?: any,  
    ): [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/) | undefined[](#find-2)
    
    #### Parameters
    
    -   predicate: (value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/), index: number, obj: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]) \=> unknown
    -   `Optional`thisArg: any
    
    #### Returns [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/) | undefined
    
    Inherited from Array.find
    

### findIndex[](#findindex)

-   findIndex(  
        predicate: (  
            value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            index: number,  
            obj: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> unknown,  
        thisArg?: any,  
    ): number[](#findindex-1)
    
    Returns the index of the first element in the array where predicate is true, and -1 otherwise.
    
    #### Parameters
    
    -   predicate: (value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/), index: number, obj: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]) \=> unknown
        
        find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, findIndex immediately returns that element index. Otherwise, findIndex returns -1.
        
    -   `Optional`thisArg: any
        
        If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.
        
    
    #### Returns number
    
    Inherited from Array.findIndex
    

### flat[](#flat)

-   flat<[A](#flata), [D](#flatd) extends number \= 1\>(this: [A](#flata), depth?: [D](#flatd)): FlatArray<[A](#flata), [D](#flatd)\>\[\][](#flat-1)
    
    Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.
    
    #### Type Parameters
    
    -   A
    -   D extends number = 1
    
    #### Parameters
    
    -   this: [A](#flata)
    -   `Optional`depth: [D](#flatd)
        
        The maximum recursion depth
        
    
    #### Returns FlatArray<[A](#flata), [D](#flatd)\>\[\]
    
    Inherited from Array.flat
    

### flatMap[](#flatmap)

-   flatMap<[U](#flatmapu), [This](#flatmapthis) \= undefined\>(  
        callback: (  
            this: [This](#flatmapthis),  
            value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            index: number,  
            array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> [U](#flatmapu) | readonly [U](#flatmapu)\[\],  
        thisArg?: [This](#flatmapthis),  
    ): [U](#flatmapu)\[\][](#flatmap-1)
    
    Calls a defined callback function on each element of an array. Then, flattens the result into a new array. This is identical to a map followed by flat with depth 1.
    
    #### Type Parameters
    
    -   U
    -   This = undefined
    
    #### Parameters
    
    -   callback: (  
            this: [This](#flatmapthis),  
            value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            index: number,  
            array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> [U](#flatmapu) | readonly [U](#flatmapu)\[\]
        
        A function that accepts up to three arguments. The flatMap method calls the callback function one time for each element in the array.
        
    -   `Optional`thisArg: [This](#flatmapthis)
        
        An object to which the this keyword can refer in the callback function. If thisArg is omitted, undefined is used as the this value.
        
    
    #### Returns [U](#flatmapu)\[\]
    
    Inherited from Array.flatMap
    

### forEach[](#foreach)

-   forEach(  
        callbackfn: (  
            value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            index: number,  
            array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> void,  
        thisArg?: any,  
    ): void[](#foreach-1)
    
    Performs the specified action for each element in an array.
    
    #### Parameters
    
    -   callbackfn: (value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/), index: number, array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]) \=> void
        
        A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
        
    -   `Optional`thisArg: any
        
        An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
        
    
    #### Returns void
    
    Inherited from Array.forEach
    

### getBounds[](#getbounds)

-   getBounds(): { max: number; min: number }[](#getbounds-1)
    
    #### Returns { max: number; min: number }
    

### getCanvasStrip[](#getcanvasstrip)

-   getCanvasStrip(  
        options?: { horizontal?: boolean; size?: number; smooth?: boolean },  
    ): HTMLCanvasElement[](#getcanvasstrip-1)
    
    #### Parameters
    
    -   `Optional`options: { horizontal?: boolean; size?: number; smooth?: boolean }
    
    #### Returns HTMLCanvasElement
    

### getColor[](#getcolor)

-   getColor(value: number, options?: { smooth?: boolean }): [RgbaColor](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/RgbaColor/)[](#getcolor-1)
    
    #### Parameters
    
    -   value: number
    -   `Optional`options: { smooth?: boolean }
    
    #### Returns [RgbaColor](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/RgbaColor/)
    

### getRawColorStops[](#getrawcolorstops)

-   getRawColorStops(): [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\][](#getrawcolorstops-1)
    
    #### Returns [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]
    

### includes[](#includes)

-   includes(searchElement: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/), fromIndex?: number): boolean[](#includes-1)
    
    Determines whether an array includes a certain element, returning true or false as appropriate.
    
    #### Parameters
    
    -   searchElement: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)
        
        The element to search for.
        
    -   `Optional`fromIndex: number
        
        The position in this array at which to begin searching for searchElement.
        
    
    #### Returns boolean
    
    Inherited from Array.includes
    

### indexOf[](#indexof)

-   indexOf(searchElement: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/), fromIndex?: number): number[](#indexof-1)
    
    Returns the index of the first occurrence of a value in an array, or -1 if it is not present.
    
    #### Parameters
    
    -   searchElement: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)
        
        The value to locate in the array.
        
    -   `Optional`fromIndex: number
        
        The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
        
    
    #### Returns number
    
    Inherited from Array.indexOf
    

### join[](#join)

-   join(separator?: string): string[](#join-1)
    
    Adds all the elements of an array into a string, separated by the specified separator string.
    
    #### Parameters
    
    -   `Optional`separator: string
        
        A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma.
        
    
    #### Returns string
    
    Inherited from Array.join
    

### keys[](#keys)

-   keys(): ArrayIterator<number\>[](#keys-1)
    
    Returns an iterable of keys in the array
    
    #### Returns ArrayIterator<number\>
    
    Inherited from Array.keys
    

### lastIndexOf[](#lastindexof)

-   lastIndexOf(searchElement: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/), fromIndex?: number): number[](#lastindexof-1)
    
    Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present.
    
    #### Parameters
    
    -   searchElement: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)
        
        The value to locate in the array.
        
    -   `Optional`fromIndex: number
        
        The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array.
        
    
    #### Returns number
    
    Inherited from Array.lastIndexOf
    

### map[](#map)

-   map<[U](#mapu)\>(  
        callbackfn: (value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/), index: number, array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]) \=> [U](#mapu),  
        thisArg?: any,  
    ): [U](#mapu)\[\][](#map-1)
    
    Calls a defined callback function on each element of an array, and returns an array that contains the results.
    
    #### Type Parameters
    
    -   U
    
    #### Parameters
    
    -   callbackfn: (value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/), index: number, array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]) \=> [U](#mapu)
        
        A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
        
    -   `Optional`thisArg: any
        
        An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
        
    
    #### Returns [U](#mapu)\[\]
    
    Inherited from Array.map
    

### pop[](#pop)

-   pop(): [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/) | undefined[](#pop-1)
    
    Removes the last element from an array and returns it. If the array is empty, undefined is returned and the array is not modified.
    
    #### Returns [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/) | undefined
    
    Inherited from Array.pop
    

### push[](#push)

-   push(...items: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]): number[](#push-1)
    
    Appends new elements to the end of an array, and returns the new length of the array.
    
    #### Parameters
    
    -   ...items: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]
        
        New elements to add to the array.
        
    
    #### Returns number
    
    Inherited from Array.push
    

### reduce[](#reduce)

-   reduce(  
        callbackfn: (  
            previousValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            currentValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            currentIndex: number,  
            array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
    ): [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)[](#reduce-1)
    
    Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
    
    #### Parameters
    
    -   callbackfn: (  
            previousValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            currentValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            currentIndex: number,  
            array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)
        
        A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
        
    
    #### Returns [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)
    
    Inherited from Array.reduce
    
-   reduce(  
        callbackfn: (  
            previousValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            currentValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            currentIndex: number,  
            array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
        initialValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
    ): [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)[](#reduce-2)
    
    #### Parameters
    
    -   callbackfn: (  
            previousValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            currentValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            currentIndex: number,  
            array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)
    -   initialValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)
    
    #### Returns [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)
    
    Inherited from Array.reduce
    
-   reduce<[U](#reduceu)\>(  
        callbackfn: (  
            previousValue: [U](#reduceu),  
            currentValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            currentIndex: number,  
            array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> [U](#reduceu),  
        initialValue: [U](#reduceu),  
    ): [U](#reduceu)[](#reduce-3)
    
    Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
    
    #### Type Parameters
    
    -   U
    
    #### Parameters
    
    -   callbackfn: (  
            previousValue: [U](#reduceu),  
            currentValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            currentIndex: number,  
            array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> [U](#reduceu)
        
        A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
        
    -   initialValue: [U](#reduceu)
        
        If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
        
    
    #### Returns [U](#reduceu)
    
    Inherited from Array.reduce
    

### reduceRight[](#reduceright)

-   reduceRight(  
        callbackfn: (  
            previousValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            currentValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            currentIndex: number,  
            array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
    ): [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)[](#reduceright-1)
    
    Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
    
    #### Parameters
    
    -   callbackfn: (  
            previousValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            currentValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            currentIndex: number,  
            array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)
        
        A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
        
    
    #### Returns [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)
    
    Inherited from Array.reduceRight
    
-   reduceRight(  
        callbackfn: (  
            previousValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            currentValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            currentIndex: number,  
            array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
        initialValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
    ): [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)[](#reduceright-2)
    
    #### Parameters
    
    -   callbackfn: (  
            previousValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            currentValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            currentIndex: number,  
            array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)
    -   initialValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)
    
    #### Returns [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)
    
    Inherited from Array.reduceRight
    
-   reduceRight<[U](#reducerightu)\>(  
        callbackfn: (  
            previousValue: [U](#reducerightu),  
            currentValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            currentIndex: number,  
            array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> [U](#reducerightu),  
        initialValue: [U](#reducerightu),  
    ): [U](#reducerightu)[](#reduceright-3)
    
    Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
    
    #### Type Parameters
    
    -   U
    
    #### Parameters
    
    -   callbackfn: (  
            previousValue: [U](#reducerightu),  
            currentValue: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            currentIndex: number,  
            array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> [U](#reducerightu)
        
        A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
        
    -   initialValue: [U](#reducerightu)
        
        If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
        
    
    #### Returns [U](#reducerightu)
    
    Inherited from Array.reduceRight
    

### reverse[](#reverse)

-   reverse(options?: { clone?: boolean }): ColorRamp[](#reverse-1)
    
    Reverses the elements in an array in place. This method mutates the array and returns a reference to the same array.
    
    #### Parameters
    
    -   `Optional`options: { clone?: boolean }
    
    #### Returns ColorRamp
    
    Overrides Array.reverse
    

### scale[](#scale)

-   scale(min: number, max: number, options?: { clone?: boolean }): ColorRamp[](#scale-1)
    
    #### Parameters
    
    -   min: number
    -   max: number
    -   `Optional`options: { clone?: boolean }
    
    #### Returns ColorRamp
    

### setStops[](#setstops)

-   setStops(stops: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\], options?: { clone?: boolean }): ColorRamp[](#setstops-1)
    
    #### Parameters
    
    -   stops: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]
    -   `Optional`options: { clone?: boolean }
    
    #### Returns ColorRamp
    

### shift[](#shift)

-   shift(): [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/) | undefined[](#shift-1)
    
    Removes the first element from an array and returns it. If the array is empty, undefined is returned and the array is not modified.
    
    #### Returns [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/) | undefined
    
    Inherited from Array.shift
    

### slice[](#slice)

-   slice(start?: number, end?: number): [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\][](#slice-1)
    
    Returns a copy of a section of an array. For both start and end, a negative index can be used to indicate an offset from the end of the array. For example, -2 refers to the second to last element of the array.
    
    #### Parameters
    
    -   `Optional`start: number
        
        The beginning index of the specified portion of the array. If start is undefined, then the slice begins at index 0.
        
    -   `Optional`end: number
        
        The end index of the specified portion of the array. This is exclusive of the element at the index 'end'. If end is undefined, then the slice extends to the end of the array.
        
    
    #### Returns [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]
    
    Inherited from Array.slice
    

### some[](#some)

-   some(  
        predicate: (  
            value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/),  
            index: number,  
            array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\],  
        ) \=> unknown,  
        thisArg?: any,  
    ): boolean[](#some-1)
    
    Determines whether the specified callback function returns true for any element of an array.
    
    #### Parameters
    
    -   predicate: (value: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/), index: number, array: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]) \=> unknown
        
        A function that accepts up to three arguments. The some method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value true, or until the end of the array.
        
    -   `Optional`thisArg: any
        
        An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
        
    
    #### Returns boolean
    
    Inherited from Array.some
    

### sort[](#sort)

-   sort(compareFn?: (a: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/), b: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)) \=> number): this[](#sort-1)
    
    Sorts an array in place. This method mutates the array and returns a reference to the same array.
    
    #### Parameters
    
    -   `Optional`compareFn: (a: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/), b: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)) \=> number
        
        Function used to determine the order of the elements. It is expected to return a negative value if the first argument is less than the second argument, zero if they're equal, and a positive value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order.
        
        ```typescript
        [11,2,22,1].sort((a, b) => a - b)
        ```
        
    
    #### Returns this
    
    Inherited from Array.sort
    

### splice[](#splice)

-   splice(start: number, deleteCount?: number): [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\][](#splice-1)
    
    Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
    
    #### Parameters
    
    -   start: number
        
        The zero-based location in the array from which to start removing elements.
        
    -   `Optional`deleteCount: number
        
        The number of elements to remove. Omitting this argument will remove all elements from the start paramater location to end of the array. If value of this argument is either a negative number, zero, undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements.
        
    
    #### Returns [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]
    
    An array containing the elements that were deleted.
    
    Inherited from Array.splice
    
-   splice(start: number, deleteCount: number, ...items: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]): [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\][](#splice-2)
    
    Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
    
    #### Parameters
    
    -   start: number
        
        The zero-based location in the array from which to start removing elements.
        
    -   deleteCount: number
        
        The number of elements to remove. If value of this argument is either a negative number, zero, undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements.
        
    -   ...items: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]
        
        Elements to insert into the array in place of the deleted elements.
        
    
    #### Returns [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]
    
    An array containing the elements that were deleted.
    
    Inherited from Array.splice
    

### toLocaleString[](#tolocalestring)

-   toLocaleString(): string[](#tolocalestring-1)
    
    Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.
    
    #### Returns string
    
    Inherited from Array.toLocaleString
    
-   toLocaleString(  
        locales: string | string\[\],  
        options?: NumberFormatOptions & DateTimeFormatOptions,  
    ): string[](#tolocalestring-2)
    
    #### Parameters
    
    -   locales: string | string\[\]
    -   `Optional`options: NumberFormatOptions & DateTimeFormatOptions
    
    #### Returns string
    
    Inherited from Array.toLocaleString
    

### toString[](#tostring)

-   toString(): string[](#tostring-1)
    
    Returns a string representation of an array.
    
    #### Returns string
    
    Inherited from Array.toString
    

### unshift[](#unshift)

-   unshift(...items: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]): number[](#unshift-1)
    
    Inserts new elements at the start of an array, and returns the new length of the array.
    
    #### Parameters
    
    -   ...items: [ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\[\]
        
        Elements to insert at the start of the array.
        
    
    #### Returns number
    
    Inherited from Array.unshift
    

### values[](#values)

-   values(): ArrayIterator<[ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\>[](#values-1)
    
    Returns an iterable of values in the array
    
    #### Returns ArrayIterator<[ColorStop](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/interfaces/ColorStop/)\>
    
    Inherited from Array.values
    

### `Static`from[](#from)

-   from<[T](#fromt)\>(arrayLike: ArrayLike<[T](#fromt)\>): [T](#fromt)\[\][](#from-1)
    
    Creates an array from an array-like object.
    
    #### Type Parameters
    
    -   T
    
    #### Parameters
    
    -   arrayLike: ArrayLike<[T](#fromt)\>
        
        An array-like object to convert to an array.
        
    
    #### Returns [T](#fromt)\[\]
    
    Inherited from Array.from
    
-   from<[T](#fromt-1), [U](#fromu)\>(  
        arrayLike: ArrayLike<[T](#fromt-1)\>,  
        mapfn: (v: [T](#fromt-1), k: number) \=> [U](#fromu),  
        thisArg?: any,  
    ): [U](#fromu)\[\][](#from-2)
    
    Creates an array from an iterable object.
    
    #### Type Parameters
    
    -   T
    -   U
    
    #### Parameters
    
    -   arrayLike: ArrayLike<[T](#fromt-1)\>
        
        An array-like object to convert to an array.
        
    -   mapfn: (v: [T](#fromt-1), k: number) \=> [U](#fromu)
        
        A mapping function to call on every element of the array.
        
    -   `Optional`thisArg: any
        
        Value of 'this' used to invoke the mapfn.
        
    
    #### Returns [U](#fromu)\[\]
    
    Inherited from Array.from
    
-   from<[T](#fromt-2)\>(iterable: Iterable<[T](#fromt-2), any, any\> | ArrayLike<[T](#fromt-2)\>): [T](#fromt-2)\[\][](#from-3)
    
    Creates an array from an iterable object.
    
    #### Type Parameters
    
    -   T
    
    #### Parameters
    
    -   iterable: Iterable<[T](#fromt-2), any, any\> | ArrayLike<[T](#fromt-2)\>
        
        An iterable object to convert to an array.
        
    
    #### Returns [T](#fromt-2)\[\]
    
    Inherited from Array.from
    
-   from<[T](#fromt-3), [U](#fromu-1)\>(  
        iterable: Iterable<[T](#fromt-3), any, any\> | ArrayLike<[T](#fromt-3)\>,  
        mapfn: (v: [T](#fromt-3), k: number) \=> [U](#fromu-1),  
        thisArg?: any,  
    ): [U](#fromu-1)\[\][](#from-4)
    
    Creates an array from an iterable object.
    
    #### Type Parameters
    
    -   T
    -   U
    
    #### Parameters
    
    -   iterable: Iterable<[T](#fromt-3), any, any\> | ArrayLike<[T](#fromt-3)\>
        
        An iterable object to convert to an array.
        
    -   mapfn: (v: [T](#fromt-3), k: number) \=> [U](#fromu-1)
        
        A mapping function to call on every element of the array.
        
    -   `Optional`thisArg: any
        
        Value of 'this' used to invoke the mapfn.
        
    
    #### Returns [U](#fromu-1)\[\]
    
    Inherited from Array.from
    

### `Static`fromArrayDefinition[](#fromarraydefinition)

-   fromArrayDefinition(cr: [ArrayColorRamp](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/ArrayColorRamp/)): ColorRamp[](#fromarraydefinition-1)
    
    Converts a array-definition color ramp definition into a usable ColorRamp instance. Note: units are not converted and may need to to be converted beforehand (eg. kelvin to centigrade)
    
    #### Parameters
    
    -   cr: [ArrayColorRamp](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/ArrayColorRamp/)
    
    #### Returns ColorRamp
    

### `Static`isArray[](#isarray)

-   isArray(arg: any): arg is any\[\][](#isarray-1)
    
    #### Parameters
    
    -   arg: any
    
    #### Returns arg is any\[\]
    
    Inherited from Array.isArray
    

### `Static`of[](#of)

-   of<[T](#oft)\>(...items: [T](#oft)\[\]): [T](#oft)\[\][](#of-1)
    
    Returns a new array from a set of elements.
    
    #### Type Parameters
    
    -   T
    
    #### Parameters
    
    -   ...items: [T](#oft)\[\]
        
        A set of elements to include in the new array object.
        
    
    #### Returns [T](#oft)\[\]
    
    Inherited from Array.of
