Colors

class Colors(val colors: Array<Color4f>, val positions: FloatArray? = null, val tileMode: FilterTileMode, val colorSpace: ColorSpace? = null)

Specification for the colors in a gradient.

Parameters

colors

The span of colors for the gradient.

positions

Relative positions of each color across the gradient. If empty, the the colors are distributed evenly. If this is not null, the values must lie between 0.0 and 1.0, and be strictly increasing. If the first value is not 0.0, then an additional color stop is added at position 0.0, with the same color as colors0. If the the last value is less than 1.0, then an additional color stop is added at position 1.0, with the same color as colorscount - 1.

tileMode

Tiling mode for the gradient.

colorSpace

Optional colorspace associated with the span of colors. If this is null, the colors are treated as sRGB.

Constructors

Link copied to clipboard
constructor(colors: Array<Color4f>, positions: FloatArray? = null, tileMode: FilterTileMode, colorSpace: ColorSpace? = null)

Properties

Link copied to clipboard
Link copied to clipboard
val colorSpace: ColorSpace? = null
Link copied to clipboard
val positions: FloatArray? = null
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int