Red Property

Gets or sets an Integer value, that represents the red component of an RGB color.

Applies to: Color object, ColorEntry object

Syntax

[[Let] redRet =] object.Red

[Let] object.Red = redSet

The Red property syntax has these parts:

Part Description
object Required. An expression that returns an instance of an object in the Applies to list.
redRet Optional. An Integer type variable.
redSet Required. An expression that returns an Integer value.

Remarks

The Red property is only effective if the color is an RGB color (see the IsRGB property).

Example

This example contains a document-level script. It demonstrates how to find out the value of the red component of the fill color (in RGB format) of a Shape object.

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 ? MsgBox(s.FillColor.Red) ' If yes, display the value of the red component. endif

 

See Also

Blue property, Green property, Red property, IsRGB Property