Convert RGB color to CMYK?

Junior Developer picture Junior Developer · Mar 11, 2010 · Viewed 33.8k times · Source

I'm looking for an algorithm to convert an RGB color to CMYK. Photoshop is performing the conversion below:

R = 220 G = 233 B = 174

C = 15 M = 0 Y = 40 K = 0

Answer

user113476 picture user113476 · Mar 11, 2010

The conversion from RGB to CMYK is dependent on the physical device/process being used to lay down the CMYK ink. These are represented in software as Color Profiles. ICC and ICM color profiles of physical devices determine the resulting colors.

If you are not concerned with true representation on a physical device then use the direct conversion formulas in other posts.

If, however, you are concerned with this aspect, then you need to use a either the Windows Color Management APIs or something like LittleCMS to do the color conversions for you (as they apply the proper color profile during the conversion).