Sets the color scheme to RGB and initializes the color components with the specified values.
Applies to: Color object, ColorEntry object
object.SetRGB ( red, green, blue ) |
The SetRGB method syntax has these parts:
Part | Description |
object | Required. An expression that returns an instance of an object in the Applies to list. |
red | Required. An expression that returns an Integer value. The value of the red component. |
green | Required. An expression that returns an Integer value. The value of the green component. |
blue | Required. An expression that returns an Integer value. The value of the blue component. |
After the SetRGB method has been called, the color is converted to the RGB format regardless of its previous format. The values of the red, green and blue can be in the range of 0 to 255, and are used to set respective components of the color.
This example contains a document-level script. It demonstrates how to change the fill color of a rectanlge in RGB format.
dim s as shape ' Create a Shape object |
See Also |
SetCMYK method |