Opal::ColorSpaces
Color space conversion engine providing exact transformations between sRGB, CIE XYZ (D65), CIELAB (Lab*), Oklab / Oklch, CMYK, HSL, and HSV.
Constants
D65 standard illuminant reference white points (2° standard observer)
Class methods
Converts CMYK [0.0..1.0] to sRGB [0..255]
Converts HSL (H in [0..360°], S in [0.0..1.0], L in [0.0..1.0]) to sRGB [0..255]
Converts HSV (H in [0..360°], S in [0.0..1.0], V in [0.0..1.0]) to sRGB [0..255]
Converts CIELAB (L*, a*, b*) to sRGB [0..255]
Converts linear RGB [0.0..1.0] to standard sRGB [0.0..1.0]
Converts Oklab (L, a, b) to sRGB [0..255]
Converts Oklch (L, C, h) to sRGB [0..255]
Converts sRGB [0..255] to CMYK [0.0..1.0]
Converts sRGB [0..255] to HSL: H in [0..360°], S in [0.0..1.0], L in [0.0..1.0]
Converts sRGB [0..255] to HSV: H in [0..360°], S in [0.0..1.0], V in [0.0..1.0]
Converts sRGB [0..255] to CIELAB: L* in [0..100], a* in [-128..127], b* in [-128..127]
Converts sRGB [0..255] to Oklab: L in [0.0..1.0], a in [-0.4..0.4], b in [-0.4..0.4]
Converts sRGB [0..255] to Oklch: L in [0.0..1.0], C in [0.0..0.4], h in [0.0..360.0°]
Converts sRGB [0..255] to CIE XYZ [0.0..1.0, 0.0..1.0, 0.0..1.0]
Converts standard sRGB [0..255] to linear RGB [0.0..1.0]