XYZColorSpace

The color space describing colors in the XYZ model.

Inheritors

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

Link copied to clipboard
abstract val whitePoint: WhitePoint

The white point that colors in this space are calculated relative to.

Functions

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

Convert a color to this space

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

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
abstract operator fun invoke(x: Float, y: Float, z: Float, alpha: Float = 1.0f): XYZ
open operator fun invoke(x: Number, y: Number, z: Number, alpha: Number = 1.0f): XYZ
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.