ColorLookupTable

class ColorLookupTable(val stops: List<ColorStop>, val range: ClosedRange<Double>, val interpolate: Boolean = true, val interval: Double = 0.0, var roundDown: Boolean = false)

Color lookup table.

Constructors

Link copied to clipboard
constructor(stops: List<ColorStop>, range: ClosedRange<Double>, interpolate: Boolean = true, interval: Double = 0.0, roundDown: Boolean = false)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val interpolate: Boolean = true

Whether color values between the defined color stops should be interpolated. When enabled, colors will be linearly interpolated and appear more gradient-like. Otherwise, values in between color stops will use the next lowest color stop resulting in only the provided color stops being rendered.

Link copied to clipboard
val interval: Double = 0.0

Interval for which color stops are desired within the data range. This value must be in the same unit as the values provided in stops and the underlying data. If set to 0.0, then the color scale will be linearly interpolated between color stops to produce a smooth gradient.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The value range for the scale.

Link copied to clipboard

Which way to round when interpolating colorstops. Default is false.

Link copied to clipboard
Link copied to clipboard

A set of values to use as color stops in the scale. When stops are provided, then the scale will not interpolate intermediate colors between stop values.

Functions

Link copied to clipboard
fun createColorLookupBitmap(width: Int, height: Int): Bitmap
Link copied to clipboard