Share via


IVsFontAndColorUtilities.GetRGBOfIndex(COLORINDEX, UInt32) Method

Definition

Obtain the RGB value corresponding to a valid member of the COLORINDEX enumeration.

public:
 int GetRGBOfIndex(Microsoft::VisualStudio::TextManager::Interop::COLORINDEX idx, [Runtime::InteropServices::Out] System::UInt32 % pcrResult);
int GetRGBOfIndex(Microsoft::VisualStudio::TextManager::Interop::COLORINDEX idx, [Runtime::InteropServices::Out] unsigned int & pcrResult);
public int GetRGBOfIndex (Microsoft.VisualStudio.TextManager.Interop.COLORINDEX idx, out uint pcrResult);
abstract member GetRGBOfIndex : Microsoft.VisualStudio.TextManager.Interop.COLORINDEX * uint32 -> int
Public Function GetRGBOfIndex (idx As COLORINDEX, ByRef pcrResult As UInteger) As Integer

Parameters

idx
COLORINDEX

[out] A valid member of the COLORINDEX enumeration corresponding crSource.

pcrResult
UInt32

[out] A COLORREF representation of color value containing the returned RGB value.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

The COLORREF returned in pcrResult has the hexadecimal format of: 0x00bbggrr

If an error occurs, the value of pcrResult is undefined.

Managed code can obtain functionality equivalent to GetSysColor with SystemColors and convert between COLORREF and the System.Drawing.Color structure using M:System.Drawing.ColorTranslator.FromWin32 and M:System.Drawing.ColorTranslator.ToWin32.

Applies to