100% Cyan in CMYK is NOT rgb(0,255,255)!!

As I mentioned in an earlier post of mine, I have to create a color picker, so I’ve already started to write the code for the Color class it’s going to use. I need it to natively support RGB, HSL, Lab and CMYK. And the latter part is causing unexpected trouble.

It seems that there is the notion out there that conversion from CMYK to RGB is easy. Newsflash: It’s not. As every graphic designer knows, the CMYK color gamut is smaller than the the RGB color gamut (even the sRGB color gamut). You can’t take a CMYK color and convert it to an out-of-CMYK-gamut RGB color! That’s nonsense! And it’s precisely what most conversion algorithms and color pickers out there do! Even Adobe Kuler!!! Since yesterday, I’ve studied dozens of algorithms and color pickers that claim to do CMYK -> RGB conversion, and every single one of them is wrong.

You can test a color picker that claims to support CMYK, or a CMYK <–> RGB conversion algorithm in the following simple way: Test how it converts the color CMYK(100%, 0, 0, 0) to RGB. If the result is rgb(0,255,255) then the algorithm is crap. rgb(0, 255, 255) is neither the same color, nor is it even in the CMYK color gamut! So basically, these algorithms convert a CMYK color to an RGB color that is outside of the CMYK color gamut! A color that cannot be represented with CMYK is supposed to be the result of a CMYK->RGB conversion? This is madness!

So far the only CMYK -> RGB converter that I’ve seen and does it right, is the one used by Adobe CS products (Photoshop, Illustrator, etc). And that makes me wonder why Kuler does it the wrong way, since they have already figured the algorithm! It’s crazy!

What’s even more strange is that I can’t even find which sRGB colors are usually out of the CMYK color gamut, so that I can adjust the algorithm I use properly (even if it just clipped the color to the nearest in-gamut one, it would be an improvement). I’ve been searching since yesterady even for that with no luck. I hope I don’t end up using the wrong algorithm myself too…

  • http://www.nbsp.es Marc Palau

    After reading so much, I understand that the main problem is that adobe koler uses diferent CMYK conversion tables (ICC).

    The correct way to understand this is knowing what ICC profile are you using in Photoshop (or Adobe software). If you use the sRGB IEC61966-2.1 profile then rgb(0,255,255) will be cmyk(57,0,13,0). Now, if you try it with a different profile for example ARRIFLEX D-20 Daylight Log (by Adobe), rgb(0,255,255) will be cmyk(100,0,0,0).

    The main problem that you will find at this point, is that each user uses his own color profile, this represents that each navigator are using its own configuration, then a perfect translation is not possible at moment. Maybe knowing the current color profile you can use the tables to made a ‘perfect’ translation of the colors, or maybe using Flash Player there is a hack to know any information about the color profile.

    For my project, I think I don’t will use the CMYK translation, you have reason with the target of the applications and I think this only can got me problems.

    reggards and cya!
    Marc

  • abelthorne

    I’m currently trying to figure out how to properly convert CMYK to RGB values. So far, I haven’t been able to find a correct algorithm (for the reasons you describe).
    One possibility I’m considering would be to understand how Scribus (free / opensource DTP software) does its conversions with CMYK RGB, as it does them quite well. Problem: the source code is really big and I’m quite lost in it. Maybe asking for help on the Scribus mailing list would provide basic explanations for a working algorithm.

  • razrwolf

    @abelthorne, I know this may be a year late, but littleCMS is what scribus uses for its color management
    this may help other people who went through the scribus source looking for how to do color conversion(me :D)

  • https://sites.google.com/site/xfolioproject/Home/comics mathart63

    Just tried printing rgb(0,256,256) from PE on an HP inkjet printer and darned if it didn’t look like pure cyan! (Note that the appearance of rgb(0,256,256) on the screen and the cyan output by the printer were radically different)

    • http://leaverou.me Lea Verou

      That’s exactly the point: That they look radically different. There are colors within the RGB spectrum that look much closer to CMYK cyan.
      Also, there’s no rgb(0, 256, 256), the components go up to 255 (0-255, 1 byte each)

  • curious

    i just did a google search for “rgb equivalent of 100c 100m 100y”
    —and after reading this interesting post of yours—
    it seems there may be one small and somewhat simple consideration that’s getting overlooked in this discussion. it may help clarify for some. —the Keep It Simple approach is often applicable even when dealing with color formula — bottom line being the intended end-use of the color formula you are creating. Any color-critical task is always going to be more clear-cut and you will pull-out-less-hair if you keep in mind the question: is my intended end-use of the color going to be ON-SCREEN or ON-PAPER[and/or other print substrate(s)]. Trying to find some kind of utopian hybrid color or color space between RGB and CMYK is always going to be more likely to cause frustration. i suppose my rant/response stems from my search which developed from trying exercise some very basic print-color-control when using a free graphics progam such as GIMP (which does not create CMYK files) when i don’t have my obvious favorite Photoshop, but the files created are going to be printed with CMYK inks. Well, actually in my case I simply want to omit the use of any black ink by replacing all values in the image that would require black ink to be created with the RGB numbers/percentages that equate to a dark-grey virtually black that can be created with c100, m100, y100. So my end-use is somewhat strange (RGB for printing), while many folks are probably trying to to take CMYK-to-RGB for the sake of accurate on-screen display. Photoshop is the right tool for this little task I’m trying and it makes it really simple, but maybe i just enjoy the challenge of trying to figure out if some simple things like this can be done with the free program(s).

  • http://twitter.com/pixeloution Erik

    I know this post is old, but have you ever solved the problem? I’m looking myself and have had no luck thus far.