Skip to content

Instantly share code, notes, and snippets.

@endolith
endolith / color_scale.py
Last active January 30, 2023 21:29
Lch color scale colormap in Python
"""
Created on Thu Feb 28 14:28:50 2013
Produces colormaps by curving through Lch color space, inspired by
"Lab color scale" by Steve Eddins 09 May 2006 (Updated 10 May 2006)
(BSD license)
http://www.mathworks.co.uk/matlabcentral/fileexchange/11037-lab-color-scale
Chroma should probably be limited to the RGB cube in a way that never
produces sharp angles in the curve, which appear as bands in the gradient.