Skip to content

Comment on Ask HN: Where do I go to talk to people about color matching?parent

Comments

Yeah, you could maybe still create all the CIECAM02 values related to your input (within some granularity limit) and discard those producing values outside the CMYK gamut.

Or you can try "gamut mapping", on them: this is through algorithms to get the closest "narrow gamut color" in CMYK from a color in a "wider gamut color space" like CIECAM02.

Search for "gamut mapping algorithms" or "gamut compression".

Thanks! It turns out "gamut mapping" was the special keyword I needed to be searching for. Immediately I was able to find the coloraide library which does everything I need it to: convert colors from CMYK to CAM16-UCS, adjust the CAM16-UCS value by some perceptual attribute, map the new CAM16-UCS value back to CMYK and adjust it again if the new value does not fit in the CMYK gamut.

https://facelessuser.github.io/coloraide

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.