API Documentation > CorelDRAW > 2025-v26 > Color > IVGColor
Color.RGBAssign method
Assigns the RGB color model
Syntax:
Sub RGBAssign(ByVal Red As Long, ByVal Green As Long, ByVal Blue As Long)
Parameters:
Name Type Description
Red
Long
Green
Long
Blue
Long
Remarks:
The RGBAssign method assigns the RGB color model in CorelDRAW. All three color components are applied in one step, and the color model is set to RGB. A color is an effect applied to an object that alters the object's appearance by the way it reflects light. A color model is a system that defines the number and type of colors that make up an image and that is used to organize and define colors according to a set of basic properties that can be reproduced. Black-and-white, grayscale, RGB, CMYK, and paletted are examples of popular color modes. RGB is a color mode that contains three components: red (R), green (G), and blue (B). The RGB color mode is based on the RGB color model. In the RGB color mode, a value between 0 and 255 is assigned to each channel of red, green, and blue. An RGB color with the component values 0:25:118, for example, contains no red, some green, and more blue, resulting in a slightly greenish blue color. Monitors, scanners, and the human eye use RGB to produce or detect color.
Examples:
The following VBA example changes the background color of the current page in the open document to red.
Sub PageActive()
ActivePage.Color.RGBAssign 255, 0, 0 
End Sub