GLSL fragment shader for testing color science and palette generation algorithms interactively. Try on Shadertoy
This project is an Android app for convenient testing on mobile devices, but the shader is compatible with Shadertoy.
See shader_frag.frag for the actual shader code.
- Perceptually-uniform color spaces
- Color appearance models
- Hue-preserving gamut mapping
- Preserve lightness, reduce chroma (default)
- Project towards neutral 50% gray
- Adaptive lightness and chroma preservation
- CIE 1931 XYZ interchange color space
- Relative luminance
- Absolute luminance in nits (cd/m²) for HDR color spaces
- Lab to LCh (lightness, chroma, hue) transformation
- Gamut shape and cusp visualization
- Material You color palette generation with time-varying hue
- Color gradient blending
- Comparing chromatic colors to neutral colors of the same lightness
- Neutral gray lightness ramp
- Rainbow hue gradient
- Dynamic CAM viewing conditions
- Device color spaces with wide color gamuts
- Display-P3
- DCI-P3
- BT.2020
To enable features and render visualizations other than the default gamut plot, uncomment the respective sections in mainImage
.
ZCAM is on the top and sRGB (non-linear) is on the bottom.