I have been trying to get color values used in my InDesign document in both cmyk and rgb mode. I do so by converting the colorspace of each color in the document to rgb if its in cmyk and then getting the colorValue of the color. Then, I revert the colorspace back to the original one. But, I am experiencing problems in this. Here is a screenshot to explain my problem better,
As you can see from the above screenshot, when the trace(tempColor.colorValue); statement is executed, the value 0,0,100,0 is traced. When the tempColor.space = ColorSpace.RGB; is executed, the values in rgb mode can be seen in the debugger. But, as soon as the next statement is executed, the color.colorValue changes to cmyk. I am unable to get the rgb mode value.