python-lcms2¶
Color management for NumPy, built on LittleCMS 2.
import lcms2
p3 = lcms2.convert(img, "sRGB", "Display P3") # uint8 in, uint8 out
lab = lcms2.Profile("sRGB").transform(img, "Lab") # float64 L*a*b*
lcms2.delta_e(lab_a, lab_b) # CIEDE2000, vectorized
lcms2.Profile(lcms2.spaces.oklab).save("oklab.icc") # an ICC profile of OKLab
You want to… |
Read |
|---|---|
Install and convert a first image |
|
Follow runnable examples, step by step |
|
Open, inspect, edit and create ICC profiles |
|
Control intents, proofing, chains and device links |
|
Mix ICC profiles with OKLab, HSV, PQ… |
|
Turn your own NumPy color math into an ICC profile |
|
Measure color differences, CIECAM02, white points |
|
Build perceptually uniform colormaps |
|
Read and write measurement (CGATS / IT8) files |
|
Know how dtypes and shapes become pixel formats |