in which IPTC field is the color code stored, at least I assume it is in an IPTC field since when I did a copy of IPTC from RAW to JPG all the JPG's got the color code too.
Do you have the "Save tag and color class in IPTC/XMP:" popup menu on the Files tab of the Preferences dialog set to something other than "Never"?
When you use the Update IPTC/XMP tool, and have your photos joined as RAW+JPEG, then the image preferences (tag, color class, etc.) are also synchronized. Did you use the Update IPTC/XMP tool on RAW+JPEG pairs?
But anyway, in the IPTC data, if you've told PM to store the tag and color class there, the data is stored in a field that cannot be edited directly in PM. We use the IPTC field with the ID of 221 (0x02DD) to store the information. The format of the data is T:C:R:IIIIII, where T is the tag and is 0 or 1, C is the color class and is 0 through 8, and R is the rank and is allowed to be 0 through 5 (but it is always 0 since it is currently unused), and IIIIII is the frame number of the photo which can be 000000 through 999999.
HTH,
-Kirk