In a managed VS package, I am trying to resolve the valid foreground and background colors in ColorableItemInfo structures to their actual RGB color values. When the __VSCOLORTYPE is CT_VSCOLOR, it's clear that I should call GetVSSysColorEx to get the actual color value. But when the __VSCOLORTYPE is CT_COLORINDEX, it's not clear how to convert into the actual color.
By looking at the value in the crForeground member when the __VSCOLORTYPE is CT_COLORINDEX, for example, I see that it always starts with 0x01 in the high order byte, and the rest of the value appears to be the index that corresponds to a value in the COLORINDEX enumeration. By masking out that high byte, I end up with a value that appears to correspond with one of the COLORINDEX values. Converting that value to an actual color is trivial for values such as CI_WHITE, CI_MAROON, etc., but is not as clear how to convert values such as CI_SYSPLAINTEXT_BK, etc.
I'm sure there must be one method somewhere that performs the conversion from the index to the RGB color. I just can't seem to find that method.
Any assistance would be appreciated. Thanks.