Question

Is there any way to convert HEX encoded RGB colors to CMYK in PHP? I have tried this PHP: HEX to CMYK but there is a bit difference in the colors, may be the above answer converts hex to RGB then converts it to CMYK.

Was it helpful?

Solution

This website goes through your problem in detail

An excerpt

The trouble with CMYK is it's pretty rough. The technique is only capable reproducing some 60 or 70% of 16.7 million colours visible to the human eye, and which we can display on a computer screen. The RGB model can represent every one of these colours, and therefore every colour that CMYK can represent; but the converse is not true. The diagram on the right shows some of CMYK's closest approximations to some bright screen colours.

This is the reason for your "bit difference" in colors. Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top