ITADN

What is a good alternative to CIELab for color quantization?

#13Openskorphil 创建于 2024-12-31
S
skorphilcommented
Hi, i'm trying to reduce colors in image to specified list of colors. I'm using kinda k-means clustering with fixed centroids and comparing colors by color difference to those centroids. As far as i tried `OKLab` / `OKLch` they perform poorly - sometimes they think that unsaturated color is closer to saturated color, than another saturated color: <img width="530" alt="Screenshot 2024-12-31 at 19 19 54" src="https://github.com/user-attachments/assets/37c6c257-bfe9-405d-b1e2-509ca67edc92" /> Although i wasn't able to find any color difference formulas for `OK` spaces... and Euclidean works poor. I wonder if there any color space and color difference algorithm comparable to `CIELab` + `DeltaE`? Maybe it is a good idea to add `CIELab` to this library?
2 条评论