HeatmapColorScale

data class HeatmapColorScale(val colors: ImmutableList<Color>, val min: Double? = null, val max: Double? = null)(source)

Maps values to colors, shared by both render modes and the legend.

colors are evenly spaced from the lowest to the highest value, so two colors give a sequential scale and three colors around a zero midpoint give a diverging one. Colors blend linearly in sRGB between neighboring stops. Values outside the bounds draw with the nearest end color.

Constructors

Link copied to clipboard
constructor(colors: ImmutableList<Color>, min: Double? = null, max: Double? = null)
constructor(colors: List<Color>, min: Double? = null, max: Double? = null)

Copies the supplied colors into an immutable list.

Properties

Link copied to clipboard
val colors: ImmutableList<Color>

Ordered colors from the lowest value to the highest; at least two.

Link copied to clipboard
val max: Double?

Fixed highest value, or null to use the largest cell value. When both bounds are null and every cell has the same value, every cell uses the middle of the scale.

Link copied to clipboard
val min: Double?

Fixed lowest value, or null to use the smallest cell value.