ColorScale

Constructors

Link copied to clipboard
constructor(colors: List<Color>, domain: List<Double>? = null, stops: List<Double>? = null)
constructor(colorStops: List<ColorStop>, range: ClosedRange<Double>? = null, normalized: Boolean = false, positions: List<Double>? = null)
constructor(options: ColorScaleOptions)
constructor()

Types

Link copied to clipboard
object Companion

Properties

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

The position of each color, each of which can be an actual data value or a value normalized to 0…1.

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

Functions

Link copied to clipboard
fun breaks(value: Any?)

Returns a distinct set of colors instead of a continuous gradient.

Link copied to clipboard
fun colorForValue(value: Double): Int
Link copied to clipboard
fun domain(domain: MutableList<Double>): Any
Link copied to clipboard
fun getColor(value: Double, bypassMap: Boolean = false): DataColorScale.RGB
Link copied to clipboard
fun getColors(total: Int, out: String = "hex"): List<DataColorScale.RGB>
Link copied to clipboard
fun getRamp(range: ClosedRange<Double>? = null, totalColors: Int = 0, interval: Double = 0.0, breaks: List<Double>? = null, interpolate: Boolean = true, normalized: Boolean = false, easing: EasingCurve? = null): ColorRampResult

Generates a color ramp based on the color scale and the provided options.

Link copied to clipboard
fun getRamp260204(range: ClosedRange<Double>? = null, totalColors: Int = 0, interval: Double = 0.0, breaks: List<Double>? = null, interpolate: Boolean = true, normalized: Boolean = false, easing: EasingCurve? = null): ColorRampResult
Link copied to clipboard
fun setColors(colors: List<Color>)
Link copied to clipboard
fun setDomain(domain: List<Double>)
Link copied to clipboard
fun setPositions(positions: List<Double>)
Link copied to clipboard
fun setStops(stops: List<Double>)