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.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top