Hi, I am struggling to understand why Illustrator is changing the values inside the RGB and CMYK boxes. I am also not sure of the exact relationship between these values. Essentially, it appears that if you set the Document Color Mode to RGB, it leaves the RGB values that you type in alone. If you set the Document Color Mode to CMYK, it leaves the CMYK values alone.
An Ai document can be either RGB or CMYK. The colors follow the document color mode and thus are converted immediately if they don't match.
But as soon as you change the Color Mode, it automatically modifies the values. So if you were in RGB mode and you set some RGB values, it changes those RGB values when you switch to CMYK mode. And vice versa.
I had thought that the CMYK palette was a subset of the RGB palette. It would make sense to me if it did this when I switched from RGB to CMYK mode, but it doesn't make sense to me why it does this when I switch from CMYK to RGB mode.
It's not. CMYK color spaces (there are more than just one) are normally smaller than RGB color spaces, but they aren't a "subset".
The other thing I am confused about is the relationship of the values in the RGB boxes to the values in the CMYK boxes. I would have thought that the relationship between them would be static. Actually, it is not. When I am in CMYK mode and I enter a CMYK value of 90 16 0 0, the RGB values become 0 158 222. But when I switch over to RGB mode, the RGB values of 0 158 222 result in CMYK values of 75 23 0 0.
When Illustrator converts the colors, it uses color management: the profiles you set up and the methods you set up. After converting it forgets the color that used to be. When converting "back", it uses color management again.
When you convert an very bright RGB color, it be out of the CMYK gamut. So it get's converted to the closest possbile CMYK color (which might still be far away from the original color. But it's not possible to convert it "back" to the bright one unless you just revert the conversion (by Cmd/Ctrl + Z).
I would have thought that the relationship between [RGB and CMYK values] would be static.
That assumption is invalid.
You need to do some reading about color theory and device dependent color calibration. It's a big subject; not something that can be thoroughly explained in a forum thread.
For a basic conceptual model: Think of three values. Multiply them. Now think of four factors that give you the same product. Is there only one set of four values?
Suppose you want to darken a given CMYK value. Theoretically you can darken it by adding K. Or, you can leave K alone and darken it by adding neutrally balanced values of CMY. Doing it the first way is advantageous for certain circumstances. Doing it the second way is advantageous for other circumstances. Or you could use any of a number of compromises between the two methods. That, in a nutshell, is the matter of black plate generation, which is just one aspect of device-dependent color handling.