Converts an OLE Color String into an RGB color value

Syntax

rv = Send_Message(Ctrl, "OLE.StringToColor", ColorString)

Parameters

ParameterDescription
ColorStringThe string representation of a color to convert

Returns

RGB Color Value

Remarks

SRP OLE Controls support an advanced color system whereby you can use system colors and color modifiers to achieve a more sophisticated look and feel. This method gives you that functionality on a more generic level.

Simply pass the color string to the method and it will return the RGB color value.

For more information regarding the formatting of color strings, see the Color topic.

Example

// Get the RGB value for the system select color at 90% luminance 
RGB_Color = Send_Message(@Window:".OLE_SUBCLASS", "OLE.StringToColor", "Select L=90") 

// Get the RGB value for the system control color 
RGB_Color = Send_Message(@Window:".OLE_SUBCLASS", "OLE.StringToColor", "3DFace") 

// Get the RGB value of an HSL color 
RGB_Color = Send_Message(@Window:".OLE_SUBCLASS", "OLE.StringToColor", "HSL{127, 127, 127}")

See Also

Color

  • No labels