Reflection Desktop VBA Guide
Attachmate.Reflection.Objects.Emulation.OpenSystems Library / Attachmate.Reflection.Objects.Emulation.OpenSystems Library / ThemeColor Object / GetColorRGB Method
An integer value between 0 and 15. This value is associated with an RGB color in the color map.
Example
In This Topic
GetColorRGB Method
In This Topic
Gets the RGB value assigned to an integer in the theme color map.
Syntax
expression.GetColorRGB( _
   ByVal color As Integer _
) As String
where expression is a variable that represents a ThemeColor Object

Parameters

color
An integer value between 0 and 15. This value is associated with an RGB color in the color map.

Return Value

A comma-separated string that includes the RGB values of the color.
Example
Get the RGB values of the screen background color
Sub GetRGBValues()
 
    Dim foregroundColorInt As Integer
    Dim backgroundColorInt As Integer
 
    Dim rgbColor As String
    
    Dim ScreenColor As Attachmate_Reflection_Objects_Emulation_OpenSystems.ThemeColor
 
    Set ScreenColor = ThisTerminal.Theme.color
    
    Rem Get the integer that screen background color is mapped to
    backgroundColorInt = ScreenColor.GetBackgroundColorAsInt(TextColorMappingAttribute_Plain)
        
    Rem Get the RGB values for the screen background color
    rgbColor = ScreenColor.GetColorRGB(backgroundColorInt)
    
    Debug.Print (rgbColor)
    
End Sub
See Also