Package-level declarations

Types

Link copied to clipboard
data class Ansi16(val code: Int) : Color

A 4-bit, 16 color ANSI code

Link copied to clipboard
data class Ansi256(val code: Int) : Color

An 8-bit, 256 color ANSI code

Link copied to clipboard
data class CMYK(val c: Float, val m: Float, val y: Float, val k: Float, val alpha: Float = 1.0f) : Color

A color in the CMYK (cyan, magenta, yellow, and key) color model.

Link copied to clipboard
data class HPLuv(val h: Float, val p: Float, val l: Float, val alpha: Float = 1.0f) : HueColor

HPLuv color space, an alternative to HSLuv that preserves as many colors as it can without distorting chroma.

Link copied to clipboard
data class HSL(val h: Float, val s: Float, val l: Float, val alpha: Float = 1.0f) : HueColor

A color model represented with Hue, Saturation, and Lightness.

Link copied to clipboard
data class HSLuv(val h: Float, val s: Float, val l: Float, val alpha: Float = 1.0f) : HueColor

HSLuv color space, a human friendly alternative to HSL.

Link copied to clipboard
data class HSV(val h: Float, val s: Float, val v: Float, val alpha: Float = 1.0f) : HueColor

A color model represented with Hue, Saturation, and Value.

Link copied to clipboard
data class HWB(val h: Float, val w: Float, val b: Float, val alpha: Float = 1.0f) : Color, HueColor

A color model represented with Hue, Whiteness, and Blackness.

Link copied to clipboard
data class ICtCp(val i: Float, val ct: Float, val cp: Float, val alpha: Float = 1.0f) : Color

The ICtCp color space, designed for high dynamic range and wide color gamut imagery.

Link copied to clipboard
data class JzAzBz(val j: Float, val a: Float, val b: Float, val alpha: Float = 1.0f) : Color

The JzAzBz color space: a perceptually uniform space where euclidean distance predicts perceptual difference.

Link copied to clipboard
data class JzCzHz(val j: Float, val c: Float, val h: Float, val alpha: Float = 1.0f) : Color, HueColor

The JzCzHz color model, the cylindrical representation of JzAzBz.

Link copied to clipboard
data class LAB : Color

CIE LAB color space, also referred to as CIE 1976 L*a*b*.

Link copied to clipboard

The color space describing colors in the LAB model.

Link copied to clipboard
Link copied to clipboard
data class LCHab : HueColor

CIE LCh(ab) color model, a.k.a. LCH, the cylindrical representation of LAB.

Link copied to clipboard

The color space describing colors in the LCHab model.

Link copied to clipboard
Link copied to clipboard
data class LCHuv : HueColor

CIE LCh(uv) color model, a.k.a. HCL, the cylindrical representation of LUV.

Link copied to clipboard

The color space describing colors in the LCHuv model.

Link copied to clipboard
Link copied to clipboard
data class LUV : Color

The CIE LUV color space, also referred to as CIE 1976 L*u*v*.

Link copied to clipboard

The color space describing colors in the LUV model.

Link copied to clipboard
Link copied to clipboard
data class Oklab(val l: Float, val a: Float, val b: Float, val alpha: Float = 1.0f) : Color

The Oklab color space: a perceptual color space for image processing.

Link copied to clipboard
data class Oklch(val l: Float, val c: Float, val h: Float, val alpha: Float = 1.0f) : Color, HueColor

Oklch color model, the cylindrical representation of Oklab.

Link copied to clipboard
data class RGB : Color

The RGB color model, using the sRGB color space by default.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
value class RGBInt(val argb: UInt) : Color

A representation of RGB that packs color components into a single integer.

Link copied to clipboard

The sRGB color space defined in IEC 61966-2-1

Link copied to clipboard
data class xyY(val x: Float, val y: Float, val Y: Float = 1.0f)

The CIE xyY color space, also used to store xy chromaticity coordinates by setting Y to 1.

Link copied to clipboard
data class XYZ : Color

The CIEXYZ color model

Link copied to clipboard

The color space describing colors in the XYZ model.

Link copied to clipboard

Functions

Link copied to clipboard

Create a new LABColorSpace that will be calculated relative to the given whitePoint

Link copied to clipboard

Create a new LCHabColorSpace that will be calculated relative to the given whitePoint

Link copied to clipboard

Create a new LCHuvColorSpace that will be calculated relative to the given whitePoint

Link copied to clipboard

Create a new LUVColorSpace that will be calculated relative to the given whitePoint

Link copied to clipboard
fun RGBColorSpace(name: String, whitePoint: WhitePoint, transferFunctions: RGBColorSpace.TransferFunctions, r: xyY, g: xyY, b: xyY): RGBColorSpace

Create a new RGBColorSpace implementation with the given name, whitePoint, transferFunctions, and r g b primaries.

Link copied to clipboard

Create a new XYZColorSpace that will be calculated relative to the given whitePoint