ColorRGBA Object

The ColorRGBA object contains all the color parameters of objects. These properties include red, green, and blue channel color values as well as opacity (alpha) values.

The following table provides the properties of the ColorRGBA object:




Returns/sets the alpha component of the RGBA color.


Returns the application object. It is a read-only property.


Returns/sets the blue component of the RGBA color.


Sets the color as an RGB value.


Returns/sets the green component of the RGBA color.


Returns/sets the opacity.


Returns the parent object. It is a read-only property.


Returns/sets the red component of the RGBA color.


The following script demonstrates how the ColorRGBA object is used in reference to the GLFillFormat object.

Sub Main


'Declares SurferApp as an object

Dim SurferApp As Object


'Creates an instance of the Surfer Application object and assigns it

'to the variable named "SurferApp"

Set SurferApp = CreateObject("Surfer.Application")


'Makes Surfer visible

SurferApp.Visible = True


'Declares Plot as an object

Dim Plot As Object


'Creates a plot document in Surfer and assigns it to the variable

'named "Plot

Set Plot = SurferApp.Documents.Add(srfDocPlot)


'Declares Shapes as an Object

Dim Shapes As Object


'Assigns the Shapes collection to the variable named "Shapes"

Set Shapes = Plot.Shapes


'Declares MapFrame as an object

Dim MapFrame As Object


'Creates a surface map and assigns the map coordinate system to the

'variable named "MapFrame"

Set MapFrame = Shapes. AddSurface(GridFileName:=SurferApp.Path+"\Samples\demogrid.grd")


'Declares SurfaceMap as an object

Dim SurfaceMap As Object


'Assigns the surface map properties to the variable named "SurfaceMap"

Set SurfaceMap = MapFrame.Overlays(1)


'Declares BaseFill as an object

Dim BaseFill As Object


'Assigns the GLFormat Object to the variable named "GLFill"

Set GLFill = SurfaceMap.BaseFill


'Declares ColorRGBA as an object

Dim ColorRGBA As Object


'Assigns the ColorRGBA object belonging to

'BaseFill to the variable named " ColorRGBA "

Set ColorRGBA = GLFill.ColorRGBA


End Sub