Archived

This topic is now archived and is closed to further replies.

LNK2001

CMYK -> RGB

Recommended Posts

LNK2001    218
Does anyone know a good algoritm for converting CMYK to RGB? Right now, I use this:
  
kFactor = 2.0;

if((cyan + black) < 255.0)
  red = 255.0 - (cyan + (black / kFactor));
else
  red = 0.0;

if((magenta + black) < 255.0)
  green = 255.0 - (magenta + (black / kFactor));
else
  green = 0.0;

if((yellow + black) <  255.0)
  blue = 255.0 - (yellow + (black / kFactor));
else
  blue = 0.0;
  
But this looks awful in some(most) cases.
"The question of whether a computer can think is no more interesting than the question of whether a submarine can swim." - Edsger W. Dijkstra

Share this post


Link to post
Share on other sites