Properties

Link copied to clipboard

Information about the components (sometimes called channels) of this color.

Link copied to clipboard
abstract val name: String

The name of this color

Functions

Link copied to clipboard
abstract fun convert(color: Color): T

Convert a color to this space

Link copied to clipboard
abstract fun create(components: FloatArray): T

Create a new instance of a color in this space from an array of components.

Link copied to clipboard

Build an interpolator that will produce colors in this color space.

fun <T : Color> ColorSpace<T>.interpolator(vararg stops: Color, premultiplyAlpha: Boolean = true): Interpolator<T>

Build a linear interpolator with two or more evenly spaced stops.

Link copied to clipboard
fun <T : Color> ColorSpace<T>.mix(color1: Color, color2: Color, hueAdjustment: ComponentAdjustment = HueAdjustments.shorter): Color
fun <T : Color> ColorSpace<T>.mix(color1: Color, color2: Color, amount2: Number, hueAdjustment: ComponentAdjustment = HueAdjustments.shorter): Color
fun <T : Color> ColorSpace<T>.mix(color1: Color, amount1: Number, color2: Color, hueAdjustment: ComponentAdjustment = HueAdjustments.shorter): Color

fun <T : Color> ColorSpace<T>.mix(color1: Color, amount1: Number, color2: Color, amount2: Number, hueAdjustment: ComponentAdjustment = HueAdjustments.shorter): Color

Mix amount1 of color1 and amount2 of color2 in this color space.