CieLab

data class CieLab @JvmOverloads constructor(L: Double, a: Double, b: Double, referenceWhite: CieXyz) : Lab

A color in the CIE Lab* uniform color space, which represents colors in dev.kdrag0n.colorkt.ucs.lab.Lab form. This is the most well-known uniform color space, but more modern alternatives such as dev.kdrag0n.colorkt.ucs.lab.Oklab tend to be more perceptually uniform.

Note that this implementation uses a white point of D65, like sRGB. It does not implement CIELAB D50.

See also

Constructors

CieLab
Link copied to clipboard
fun CieLab(L: Double, a: Double, b: Double, referenceWhite: CieXyz = Illuminants.D65)

Types

Companion
Link copied to clipboard
object Companion

Functions

toXyz
Link copied to clipboard
fun toXyz(): CieXyz

Convert this color to the CIE XYZ color space.

Properties

a
Link copied to clipboard
open override val a: Double

Green/red color component.

b
Link copied to clipboard
open override val b: Double

Blue/yellow color component.

L
Link copied to clipboard
open override val L: Double

Perceived lightness component.

referenceWhite
Link copied to clipboard
val referenceWhite: CieXyz

Reference white for CIELAB calculations. This affects the converted color.

Extensions

toCieLch
Link copied to clipboard
@JvmName(name = "fromCieLab")
fun CieLab.toCieLch(): CieLch

Convert this color to the polar (LCh) representation of CIELAB.