## Need help with RGB -> CMYK

### Need help with RGB -> CMYK

I've got a formula that theoretically converts an RGB color value to a
CMYK value.  The trouble is, of course, that it doesn't work (as tested by
comparing the original RGB to the new CMYK color in Photoshop).  So here's
what I'm using:

RGB -> CMY
C = 1 - R
M = 1 - G
Y = 1 - B

CMY -> CMYK
K = min (C, M, Y)
C = (C - K) / (1 - K)
M = (M - K) / (1 - K)
Y = (Y - K) / (1 - K)

This was taken from a web-faq on color spaces.  Does anyone know of a more
accurate way of doing this?  Is this in vain?

On another note...does anyone know of a way to convert an RGB value to
it's Pantone equivalent?  Somehow I doubt it, but it's worth a shot.

Thanks for any help..

Bryan Horling

### Need help with RGB -> CMYK

Quote:>I've got a formula that theoretically converts an RGB color value to a
>CMYK value.  The trouble is, of course, that it doesn't work (as tested by
>comparing the original RGB to the new CMYK color in Photoshop).

Try this to do variable under color removal (how much of the combined CMY ink
is replaced by black).

Pick UCR to be 0 to 1 somewhere. 0.2 may be a good starting point. You should
be able to see and change the value photoshop is using if I remember right.
If not, it's just a bit of algebra to compute the value.

Per pixel:
k = min (1-r, 1-g, 1-b) * UCR
c = 1-r-k
m = 1-g-k
y = 1-b-k

Of course you have to scale your intensities to be in the range 0 to 1, or
change the 1 to be your maximum intensity level for this to work.

John M. Olsen

http://www.allencomm.com/

I've got a formula that theoretically converts an RGB color value to a
CMYK value.  The trouble is, of course, that it doesn't work (as tested by
comparing the original RGB to the new CMYK color in Photoshop).  So here's
what I'm using:

RGB -> CMY
C = 1 - R
M = 1 - G
Y = 1 - B

CMY -> CMYK
K = min (C, M, Y)
C = (C - K) / (1 - K)
M = (M - K) / (1 - K)
Y = (Y - K) / (1 - K)

This was taken from a web-faq on color spaces.  Does anyone know of a more
accurate way of doing this?  Is this in vain?

On another note...does anyone know of a way to convert an RGB value to
it's Pantone equivalent?  Somehow I doubt it, but it's worth a shot.

Thanks for any help..

Bryan Horling