IsRGB Property

Read-only. Returns a Boolean value. If the object has an RGB color, returns TRUE. Otherwise returns FALSE.

Applies to: Color object, ColorEntry object

Syntax

[[Let] isRGBRet =] object.IsRGB

The IsRGB property syntax has these parts:

Part Description
object Required. An expression that returns an instance of an object in the Applies to list.
isRGBRet Optional. A Boolean type variable.

Remarks

It's recommended that you check the status of this property before using the Red, Green, and Blue properties.

Example

This example contains a document-level script. It demonstrates how to find out the color format of the fill color in a Shape object. If the color is in the RGB format, the value of the Red component is displayed.

dim s as shape

' Create a Shape object
s = thisDoc.ActivePage.DrawRect(100,100,1000,1000)
If s.FillColor.IsRGB <> false Then ' An RGB color ? trace s.FillColor.Red ' If yes, display the value of the Red property endif

 

See Also

Blue property, Green property, Red property, Index Property, IsRGB Property, IsCMYK Property