Previous Document Next Document

Object Model Reference : Classes : A : Application : Methods : Application.CreateColorEx


Application.CreateColorEx

Function CreateColorEx([ColorModel As Long], [V1 As Long], [V2 As Long], [V3 As Long], [V4 As Long], [V5 As Long], [V6 As Long], [V7 As Long]) As Color

Description

Member of Application

The CreateColorEx method creates a color object and initializes it, with specified color information using a Corel SCRIPT color specification.

Parameter
Description
ColorModel
Specifies the color model used to create the new color. This parameter specifies the numeric variable that is assigned to the color model.
This paramater is optional, and its default value is 0.
V1
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.
This paramater is optional, and its default value is 0.
V2
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.
This paramater is optional, and its default value is 0.
V3
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.
This paramater is optional, and its default value is 0.
V4
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.
This paramater is optional, and its default value is 0.
V5
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.
This paramater is optional, and its default value is 0.
V6
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.
This paramater is optional, and its default value is 0.
V7
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.
This paramater is optional, and its default value is 0.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.