January 26, 2009

CMYK + RGB: Can't We All Just Get Along?

There are plenty of articles out there that discuss CMYK and RGB in general. At this point, I'm assuming you already know what the differences are between them, and you also know when to use each one. The point of this article though, is what happens when you end up working with both in Illustrator.

In the days of Illustrator 8, one was able to combine both RGB and CMYK artwork within the same document. Many printers took issue with this as they would often receive RGB artwork (containing bright and vibrant colors), but when they delivered the print job, the client would complain that the colors shifted, as we know happens with the lower-gamut CMYK colorspace. The bigger issue was that it was possible to have colors within a single document across the two colorspaces, causing odd shifts of color on the same page.

When Illustrator 9 came out, Adobe implemented a new behavior, that matched Photoshop's model: all documents can be EITHER defined in the CMYK or the RGB colorspace, but a single document couldn't contain artwork from BOTH colorspaces. The one exception to this rule is obviously placed-linked content. One could still place an RGB image into a CMYK document, as the image is just a link. However, as soon as you would embed the image, the image would be converted to CMYK to match the document.

In fact, Illustrator does that across the board. If you have two files open on your screen - one RGB and one CMYK - and you copy some art from the RGB file and paste it into the CMYK file, as soon as you paste the art into the CMYK document, Illustrator converts the RGB colors to CMYK colors.

Just about everyone knows that when you create a new document, you can choose RGB or CMYK at the start. Most also know that at any time, you can choose File > Document Color Mode and CHANGE your document from one color space to another (this is akin to choosing Image > Mode in Photoshop). And you might do so when you get an RGB file (for example, from a client, from a file that you've used to create some web graphic, or from a stock photo house, like iStockPhoto for example). You might think that you need the art for print and so changing the document color mode to CMYK will make everything peachy. Well, maybe not. As we always do here at the Real World Illustrator blog, let's take a closer look...

When you launch Illustrator, and no documents are open, you'll notice that the panels are empty. There are no colors in the Swatches panel, no symbols, no brushes, etc.

When you create a new document - in this case, an RGB document, as I'll use the Web profile - the panels are suddenly populated with content. Lovely color, symbols, etc. Where does all of that content come from? The answer is: from the NDP (New Document Profile) that you chose when you created the file. So in this case, it all came from the RGB-based Web NDP.

It's essential to understand this because of this all important fact: In Illustrator, the DOCUMENT is limited to a single color space, but the PANELS are not. A single panel in Illustrator can contain both CMYK and RGB content. For example, there's nothing preventing you from opening a new CMYK document, but then defining a new RGB swatch in that document. Each time you apply that swatch to an object on your artboard, Illustrator will automatically convert that object to CMYK. In other words, you'll get an RGB to CMYK color conversion.

It's easy to see this for yourself: just create a new CMYK document, and then create a new swatch. Set its color mode to RGB and set its value to 0,0,0 (black) and then apply that color to any object in your document. If you take a look at the color panel, you'll see that object's CMYK values aren't 100k -- they are a mix of CMYK percentages that would make any printer go mad (the exact values will differ depending on your color management settings).

In addition, color swatches themselves can only define a swatch using ONE color mode. You can't have a single swatch that contains 2 definitions (for example, 100k in CMYK and 0,0,0 in RGB). In fact, there's only one kind of swatch that exists in Illustrator today that can contain 2 color definitions, and that's a Book Color. Book Colors contain both CMYK and LAB color definitions and serve up the one you need based on your settings (see this article for more details).

So now let's put these two all-important facts together: New documents get their default swatches from a specific NDP, which you choose when you first create your file. In addition, while documents are restricted to a single colorspace, panels (and the content within them) are not restricted at all. So what happens when you start with an RGB document and you then choose File > Document Color Mode to change it to CMYK? The ARTBOARD changes to CMYK, but all of the CONTENT in your document's panels (Swatches, Symbols, Brushes, etc.) are still RGB. Those haven't changed at all. Which means as you continue working, each time you apply a color from a swatch, you're getting an RGB to CMYK conversion with all those messy values.

So what do you do? Well, there's the hard way, and the easy way. Naturally, I prefer the easy way - which is to simply avoid converting the document color space entirely. If you have artwork that was created in an RGB document and you need to repurpose it for print, copy and paste the content into a new CMYK file. In that way, all the content in your new CMYK document will be CMYK. Alternatively, there's the hard way - which is to delete all of your swatches and symbols in your existing RGB file, and to load the CMYK ones. You can do this by choosing Window > Swatch Libraries > Default Swatches, and opening your CMYK library of choice.

At the end of the day, I'm hoping that at some point, Illustrator will allow us to create "smart swatches" like Book Color swatches, which would allow us to define a single color both in CMYK and RGB breakdowns. Then, depending on what color mode we choose, Illustrator just serves up the right one. In this way, colors would never go through color conversions, and we'd have much more control over how our art can be repurposed for different needs. In theory, such a capability would allow us to create artwork that would internally know how to adjust itself for both print and web workflows. Until then, we have to struggle with these nagging issues.


Anonymous said...

I'd like to see Illustrator go back to allowing mixed CMYK and RGB in the same document, as InDesign does. I frequently need to mix the two (such as when combining an RGB photo with CMYK vector artwork), and I don't want the conversion happening until much later in the workflow (in a fully color managed environment, this would happen in the printer or RIP). I'm currently forced to use InDesign in these situations, which is fine - I love InDesign and use it regularly for page layout and document design - but it's not the best tool for illustration.

Unknown said...

That workflow currently exists - as long as you choose to link your image when you place it instead of embedding it. In such a case, you can place-link RGB images into a CMYK document, and those image will be color-managed correctly (hence, also supporting a PDF/X-3 workflow).

Colorburned said...

Nice article Mordy! Very useful information!


Linda said...

Thanks for the great article. Speaking of colour, there is an option in Illustrator CS3 and 4 in which I do not see the difference. If I make a colour and add it to my Swatch panel the colour panel changes into a 'Tint panel'. In this panel I have the option of converting my global swatch colour into a process colour or CMYK. I thought process was CMYK? Could you please explain the differences between these options?
Thank you,

Unknown said...

Linda - Let me know if this article helps at all. In reference to Illustrator's definition of a "color type", process means a color that is made up of a mixture of primary colors, whereas a spot color is a custom mixed (solid) color. In the print world, yes, we often refer to a CMYK job as a "process" job, but Illustrator calls both CMYK and RGB colors "process" colors as they are defined from a mixture of primaries.

Anonymous said...

I'm interested to know, why Illy (and PS i think) always assume that i want to use cmyk values for spot colors, and this setting can't be set to be persistent?

Also, when you open new document, and use one color space to work on it's rather simple, but things can get complicated if you get illustrator file with several embedded profiles, it's all how you set your color management to behave.
I think, by default illustrator is set to preserve numbers and ignore embedded profiles?
In cmyk space of course..

Linda said...

Thanks Mordy,
The article was very clear,but I still do not see the use of two buttons with the same result. Click the process grey icon in RGB mode or the coloured RGB icon and the 'global colour panel' becomes an RGB color panel with sliders. The same goes for global CMYK colours.
Thanks again

Judit Gueth said...

Very helpful article. Thank you for posting it!

Anonymous said...

what's the problem of illustrator converting the colors? I thought it handles all the math for us? Can you explain more.

Anonymous said...

I'd like to thank you so much for this information!!! While I am a 17 year design veteran I had a recent issue with my Illustrator files that you helped me figure out. I had a design that I downloaded a piece of mesh gradient art that was rgb for use in the design. I kept changing it to cmyk and it kept reverting back to rgb. Then my older illustrator files also starting opening as rgb files instead of cymk. I thought something was wrong with my Illustrator! But now I know that I just needed to switch to a cmyk preview document. I copied my mesh gradient art and pasted into the cymk new doc and all is okay. Even my old files are opening correctly again. Thanks! I was so frustrated!!

carolina said...

awesome article, but just to be clear, is there a way for me to know once i finished the design or in between if i am using the proper colors (for web or print design)i am asking because i cant tell the difference i dont know where to look on illustrator is the color i am choosing is IN FACT cmyk or RGB, as for he pictures i always go to photoshop first set the pic as RGB or CMYK (according to what i need) and then i set the picture on illustrator .

Unknown said...

@carolina -- once you've used a color on your artboard, it will always be converted to the document color mode. You can check if a color was defined correctly just by seeing if it has odd numbers (i.e. decimal values for CMYK). Another great way to check is to select your artwork and use the Recolor Artwork feature to see if multiple color definitions exist.