Previous Document Next Document

Object Model Reference : Classes : C : Color : Methods : Color.CorelScriptAssign


Color.CorelScriptAssign

Sub CorelScriptAssign(ColorModel As Long, V1 As Long, [V2 As Long], [V3 As Long], [V4 As Long], [V5 As Long], [V6 As Long], [V7 As Long])

Description

Member of Color

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.

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. A color model is a simple color chart that defines the range of colors displayed in a color mode.
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.
V2
Specifies the numeric variable that is assigned to the second color component of the selected color model. This parameter 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. This parameter 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. This parameter 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. This parameter 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. This parameter 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. This parameter is optional, and its default value is 0.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.