Package-level declarations

Types

Link copied to clipboard

Allows performing select algebraic operations on colors of this kind.

Link copied to clipboard
interface ChromaColor<T>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Serializable
data class ColorLABa(val l: Double, val a: Double, val b: Double, val alpha: Double = 1.0, val ref: ColorXYZa = ColorXYZa.NEUTRAL) : ColorModel<ColorLABa> , ReferenceWhitePoint, ShadableColor<ColorLABa> , LuminosityColor<ColorLABa> , AlgebraicColor<ColorLABa>

The CIELAB color space, more commonly known as Lab.

Link copied to clipboard

The CIELChAB color space is the cylindrical representation of the CIELAB color space.

Link copied to clipboard

The CIELChUV color space is the cylindrical representation of the CIELUV color space.

Link copied to clipboard
@Serializable
data class ColorLSHABa(val l: Double, val s: Double, val h: Double, val alpha: Double = 1.0, val ref: ColorXYZa = ColorXYZa.NEUTRAL) : ColorModel<ColorLSHABa> , ReferenceWhitePoint, HueShiftableColor<ColorLSHABa> , SaturatableColor<ColorLSHABa> , LuminosityColor<ColorLSHABa> , AlgebraicColor<ColorLSHABa>

Based on ColorLCHABa, but instead tries to use a normalized chroma.

Link copied to clipboard
@Serializable
data class ColorLSHUVa(val l: Double, val s: Double, val h: Double, val alpha: Double = 1.0, val ref: ColorXYZa = ColorXYZa.NEUTRAL) : ColorModel<ColorLSHUVa> , ReferenceWhitePoint, HueShiftableColor<ColorLSHUVa> , SaturatableColor<ColorLSHUVa> , LuminosityColor<ColorLSHUVa> , AlgebraicColor<ColorLSHUVa>

Based on ColorLCHUVa, but instead tries to use a normalized chroma.

Link copied to clipboard
Link copied to clipboard
@Serializable
data class ColorRGBa(val r: Double, val g: Double, val b: Double, val alpha: Double = 1.0, val linearity: Linearity = Linearity.LINEAR) : ColorModel<ColorRGBa> , ShadableColor<ColorRGBa> , AlgebraicColor<ColorRGBa>

A generic RGB color space capable of representing both the linear and the sRGB color spaces.

Link copied to clipboard

Practically identical to ColorHSLa, but for mapping colors to classical painter's scheme of complementary colors.

Link copied to clipboard

Practically identical to ColorHSVa, but for mapping colors to classical painter's scheme of complementary colors.

Link copied to clipboard
@Serializable
data class ColorXYZa(val x: Double, val y: Double, val z: Double, val alpha: Double = 1.0) : ColorModel<ColorXYZa> , AlgebraicColor<ColorXYZa>
Link copied to clipboard
@Serializable
data class ColorYxya(val yy: Double, val x: Double, val y: Double, val alpha: Double = 1.0) : ColorModel<ColorYxya>

The Yxy color space, also known as the xyY color space.

Link copied to clipboard
Link copied to clipboard
interface HueShiftableColor<T>
Link copied to clipboard
@Serializable
enum Linearity : Enum<Linearity>
Link copied to clipboard
interface LuminosityColor<T>
Link copied to clipboard
interface OpacifiableColor<T>
Link copied to clipboard
Link copied to clipboard
interface SaturatableColor<T>
Link copied to clipboard
interface ShadableColor<T>

Functions

Link copied to clipboard
fun findHue(id: Int): Hue?
Link copied to clipboard
fun hsl(h: Double, s: Double, l: Double, a: Double = 1.0): ColorHSLa
Link copied to clipboard
fun hsv(h: Double, s: Double, v: Double, a: Double = 1.0): ColorHSVa
Link copied to clipboard
fun mix(left: ColorHSLa, right: ColorHSLa, x: Double): ColorHSLa

Weighted mix between two colors in the HSL color space.

fun mix(left: ColorHSVa, right: ColorHSVa, x: Double): ColorHSVa

Weighted mix between two colors in the HSVa color space.

fun mix(left: ColorLCHABa, right: ColorLCHABa, x: Double): ColorLCHABa

Weighted mix between two colors in the LChAB color space.

fun mix(left: ColorLCHUVa, right: ColorLCHUVa, x: Double): ColorLCHUVa

Weighted mix between two colors in the LChUV color space.

fun mix(left: ColorRGBa, right: ColorRGBa, x: Double): ColorRGBa

Weighted mix between two colors in the generic RGB color space.

fun mix(left: ColorXSLa, right: ColorXSLa, x: Double): ColorXSLa

Weighted mix between two colors in the XSL color space.

fun mix(left: ColorXSVa, right: ColorXSVa, x: Double): ColorXSVa

Weighted mix between two colors in the XSV color space.

Link copied to clipboard
fun rgb(hex: String): ColorRGBa

Shorthand for calling ColorRGBa.fromHex. Creates a ColorRGBa from a hex string.

fun rgb(gray: Double, a: Double = 1.0): ColorRGBa

Shorthand for calling ColorRGBa.

fun rgb(r: Double, g: Double, b: Double, a: Double = 1.0): ColorRGBa

Shorthand for calling ColorRGBa. Specify only one value to obtain a shade of gray.

Link copied to clipboard
operator fun Matrix55.times(color: ColorRGBa): ColorRGBa

Properties

Link copied to clipboard
val hues: List<Hue>