Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

If I draw a coloured diagram like Graphics[{CMYKColor[0, 0.83, 1, 0], Rectangle[{0, 0}], CMYKColor[1, 0, 0, 0], Rectangle[{0.5, 0.5}]}] and select the red rectangle using Drawing Tools Colours, it gives a different colour than I originally input.

enter image description here

When I exported the image as an eps and opened it in Illustrator, the red was back to [0,0.83,1,0]. Why are the colour sliders in Mathematica giving a different value?

share|improve this question
    
Try CMYKColor[0, .83, 1, 0]? I can't seem to reproduce your image here, strangely... –  cormullion Sep 23 '13 at 22:41
    
@cormullion Sorry, I typed my example wrong but still have the same issue. I'll update the question. –  keystonethewizard Sep 23 '13 at 23:19
    
Ah, I see what you're doing now - you're displaying the system color picker to sample the RGB screen colour. I couldn't work out how to display the picker from Mathematica's drawing tools... :) –  cormullion Sep 24 '13 at 10:55
add comment

2 Answers

up vote 4 down vote accepted

I'm not entirely sure, but I believe what you are observing is a subtlety of the interaction between Mathematica and your operating system. You use a color-chooser dialog (Format -> Font Color -> Palette), which definitely interacts with your OS. The reason for my assumption is, that on my OS I can pick not only colors in the Mathematica notebooks but from the entire screen.

When I use now this color to draw another rectangle, I get the following image

Mathematica graphics

Clearly, this is not the same color.

I think the following happens: You use the magnifier to pick a color, but instead of picking the CMYK color, you simply pick the RGB pixel value of the screen. Then you can display the corresponding CMYK values again, but somewhere in this conversion your original values are lost.

When you export the graphic directly to EPS, then the Mathematica Kernel takes care that the color values are kept.

share|improve this answer
add comment

Although it is true you are observing an interaction between operating systems. The reason for that is due to the choice of CMYK values. The appearance of most CMYK values are dependent on the gamut of the CMYK color model used in the software where those CMYK values were chosen. You mentioned that those CMYK values changed appearance when you moved to Illustrator on a PC from Mathematica on a Mac. The default CMYK Space in Illustrator can be checked by using "control+Shift+K" or command+shift+K on a Mac. Having one application that uses a generic Quartz CMYK space, and Adobe Illustrator which uses a defined CMYK device space, is the reason for the visual differences and the measurable differences in RGB measurements from each color. To get around this issue you can assign an ICC profile to the image you create in Mathematica, then the color will not change so long as the profile is maintained accross the various different softwares and OS's

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.