ee.Palette

Creates a palette.

UsageReturns
ee.Palette(colors, mode, min, max, padding, classes, positions, correctLightness, gamma, bezier)Palette
ArgumentTypeDetails
colorsObject, default: nullA list of colors or the name of a predefined color palette.
modeString, default: "RGB"The colorspace in which to interpolate. One of 'rgb', 'lrgb', 'hsv', 'hsl', 'lab' or 'lch'.
minFloat, default: nullThe minimum value of the palette. Values less than min will be clamped to min.
maxFloat, default: nullThe maximum value of the palette. Values greater than max will be clamped to max.
paddingList, default: nullShifts the color range by padding the end of the color scale (a percentage 0-1). Positive values reduce the spread of the gradient and negative values expand it. If only 1 value is provided, the same padding will be applied to both ends.
classesList, default: nullCreate a palette representing discrete classes instead of a continuous gradient. Either a list of class break values, or a single number indicating the number of equidistant breaks to generate between 'min' and 'max'. This option is mutually exclusive with 'positions'.
positionsList, default: nullSet the positions for the colors. The number of positions must exactly match the number of colors in the palette. Resets 'min' & 'max' to first and last value. This option is mutually exclusive with 'min'/'max' and 'classes'.
correctLightnessBoolean, default: falseCorrect the color spacing to spread the (Lab) lightness range evenly over the range of values.
gammaFloat, default: 1A gamma correction for the palette. Numbers greater than 1 increase lightness.
bezierBoolean, default: falseSets the palette to use Bezier interpolation.