API Documentation > CorelDRAW > 2025-v26 > Application > IVGApplication
Application.CreateColorEx method
Creates a default color
Syntax:
Function CreateColorEx(Optional ByVal ColorModel As Long = 0, Optional ByVal V1 As Long = 0, 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) As Color
Parameters:
Name Type Description
ColorModel
Long
Specifies the color model used to create the new color. This parameter specifies the numeric variable that is assigned to the color model.
V1
Long
Specifies the numeric variable that is assigned to the first color component of the selected color model. For example, cyan is the first color component of the CMYK color model. The value is a percentage and can range from 1 to 100. A color that is selected at 100 is applied with full saturation.
V2
Long
Specifies the numeric variable that is assigned to the second color component of the selected color model. For example, magenta is the second color component of the CMYK color model. The value is a percentage and can range from 1 to 100. A color that is selected at 100 is applied with full saturation.
V3
Long
Specifies the numeric variable that is assigned to the third color component of the selected color model. For example, yellow is the third color component of the CMYK color model. The value is a percentage and can range from 1 to 100. A color that is selected at 100 is applied with full saturation.
V4
Long
Specifies the numeric variable that is assigned to the fourth color component of the selected color model. For example, black is the fourth color component of the CMYK color model. The value is a percentage and can range from 1 to 100. A color that is selected at 100 is applied with full saturation.
V5
Long
Specifies the numeric variable that is assigned to the fifth color component of the selected color model. Even though the most popular color models use only four levels of color saturations, CorelDRAW can create colors using seven color channels.
V6
Long
Specifies the numeric variable that is assigned to the sixth color component of the selected color model. Even though the most popular color models use only four levels of color saturations, CorelDRAW can create colors using seven color channels.
V7
Long
Specifies the numeric variable that is assigned to the seventh color component of the selected color model. Even though the most popular color models use only four levels of color saturations, CorelDRAW can create colors using seven color channels.
Remarks:
The CreateColorEx method creates a color object and initializes it, with specified color information using a Corel SCRIPT color specification.
Examples:
The following VBA example adds a new color to the active color palette.
Sub CreatePaletteColor()
ActivePalette.AddColor CreateColorEx(5002, 90, 90, 0, 0) 
End Sub