colorspace implements different color space logic to allow for conversion from colorspace to colorspace and interpolation within each colorspace.
How to install package with newer versions of Go (+1.16):
go mod download github.com/soypat/colorspace@latest
Shown in each image are 5 different color gradients generated with linear interpolation in each available colorspace. See examples/lerp
:
- Topmost: sRGB. This is the naive linear interpolation
- Linear sRGB.
- CIE XYZ
- OKLAB
- OKLCH. Designed to yield the most perceptively uniform gradient.