Color space conversions, metrics, and other utility functions for color in GLSL.
Still very much a work-in-progress! If you see anything wrong, please let me know (or make a new branch if you're feeling nice).
Color Spaces:
- XYZ
- sRGB
- RGB
- L*a*b* (CIELAB)
- LCh (CIELCh)
- P3 Display
- sYCC (sRGB's official YCbCr space)
- OkLab
Other:
- A (proper) implementation of CIE Delta-E 2000
- Color from temperature (cubic approximation) and temperature from color (McCamy approximation)
- Lightness / Luminance / Luma functions
- D65/D50 white point option for RGB<->XYZ and L*a*b*<->XYZ
- OkHSL/OkHSV
- Chroma/Hue getter functions
- Delta E CMC
- Color temperature adjustment
- Interpolation wrapper functions
- CIELUV
- Gamut mapping?
Inspired by tobspr's GLSL-Color-Spaces. Algorithms and math from:
- CIE and ICC
- Bruce Lindbloom
- Color.js
- Other authors as listed in comments