API Documentation > CorelDRAW > 2025-v26 > Color > IVGColor
Color.CorelScriptAssign method
Assigns a color object based on Corel SCRIPT color specification values
Syntax:
Sub CorelScriptAssign(ByVal ColorModel As Long, ByVal V1 As Long, Optional ByVal V2 As Long = 0, Optional ByVal V3 As Long = 0, Optional ByVal V4 As Long = 0, Optional ByVal V5 As Long = 0, Optional ByVal V6 As Long = 0, Optional ByVal V7 As Long = 0)
Parameters:
Name Type Description
ColorModel
Long
V1
Long
V2
Long
Specifies the numeric variable that is assigned to the second color component of the selected color model.
V3
Long
Specifies the numeric variable that is assigned to the third color component of the selected color model.
V4
Long
Specifies the numeric variable that is assigned to the fourth color component of the selected color model.
V5
Long
Specifies the numeric variable that is assigned to the fifth color component of the selected color model.
V6
Long
Specifies the numeric variable that is assigned to the sixth color component of the selected color model.
V7
Long
Specifies the numeric variable that is assigned to the seventh color component of the selected color model.
Remarks:
The CorelScriptAssign method assigns a color object based on Corel SCRIPT color specification values in CorelDRAW. 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.
Examples:
The following VBA example sets the background color of the current page to RGB red.
Sub Test()
ActiveDocument.ActivePage.Color.CorelScriptAssign 5005, 255, 0, 0 
End Sub