Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
typealias ColorMapper<T> = ColorSpace<T>.(components: FloatArray) -> FloatArray

A mapping function used with map.

Link copied to clipboard
typealias ComponentAdjustment = (hues: List<Float>) -> List<Float>

A function that takes a list of values for a single component and returns a new list with the value to use for interpolation of that component.

Link copied to clipboard
fun interface EasingFunction

A function for use with interpolator easing.

Link copied to clipboard

Built-in easing functions for use with interpolator easing.

Link copied to clipboard
Link copied to clipboard

A method used for interpolation.

Link copied to clipboard
Link copied to clipboard
interface Interpolator<T : Color>

An interpolator between two or more colors.

Link copied to clipboard
Link copied to clipboard

A builder for configuring an InterpolatorBuilder stop.

Link copied to clipboard

A converter that transforms RGB colors from one RGBColorSpace to another.

Functions

Link copied to clipboard

Create an RGBToRGBConverter that transforms RGB colors from this RGBColorSpace to the destination space.

Link copied to clipboard

Create a chromatic adapter that will adapt colors from a given sourceWhite to this color space's reference white

Create a chromatic adapter that will adapt RGBInt colors from a given sourceWhite to D65

Link copied to clipboard
fun <T : Color> T.divideAlpha(): T

Divide this color's components by its alpha value.

Link copied to clipboard
fun <T : Color> T.interpolate(other: Color, t: Number, premultiplyAlpha: Boolean = true, hueAdjustment: ComponentAdjustment = HueAdjustments.shorter): T

Interpolate linearly between this color and other.

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> T.map(transform: ColorMapper<T>): T

Return an new color in the same color space that is the result of applying transform to the components of this color.

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.

Link copied to clipboard
fun <T : Color> T.multiplyAlpha(): T

Multiply this color's components by its alpha value.

Link copied to clipboard
fun <T : Color> Interpolator<T>.sequence(length: Int): Sequence<T>

Create a sequence of length colors evenly spaced along this interpolator's values