A colorRamp object is used to specify a range of colors that are applied to a group of symbols. See https://developers.arcgis.com/web-map-specification/objects/colorRamp/.

interface ColorRampJson {
    algorithm?: "esriCIELabAlgorithm" | "esriHSVAlgorithm" | "esriLabLChAlgorithm";
    colorRamps?: ColorRampJson[];
    fromColor?: [number, number, number, number];
    toColor?: [number, number, number, number];
    type: "algorithmic" | "multipart";
}

Properties

algorithm?: "esriCIELabAlgorithm" | "esriHSVAlgorithm" | "esriLabLChAlgorithm"

Algorithm used for calculating the ramp.

colorRamps?: ColorRampJson[]

A multipart color ramp is defined by a list of constituent color ramps.

fromColor?: [number, number, number, number]

Array representing the initial color to start the ramp from.

toColor?: [number, number, number, number]

Array representing the final color to end the ramp with.

type: "algorithmic" | "multipart"

Value indicating the type of colorRamp.