Previous Document Next Document

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


Color.CMYAssign

Sub CMYAssign(Cyan As Long, Magenta As Long, Yellow As Long)

Description

Member of Color

The CMYAssign method assigns the CMY color model in CorelDRAW. All three color components are applied in one step, and the color model is set to CMY.

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.

CMY is a color mode made up of cyan (C), magenta (M), and yellow (Y). This mode is used in the three-color printing process. In Corel applications, the CMY mode is the inverse of the RGB mode, with values ranging from 0 to 255. The CMY color mode is based on the CMY color model.

Parameter
Description
Cyan
Specifies the level of cyan in the CMY color model
Values range from 0 to 255.
Magenta
Specifies the level of magenta in the CMY color model
Values range from 0 to 255.
Yellow
Specifies the level of yellow in the CMY color model
Values range from 0 to 255.

VBA example

The following VBA example creates an ellipse on the active layer in the current document.

Sub LayerActive()
 ActiveLayer.CreateEllipse 3, 3, 2, 1
 ActiveDocument.Selection.Shapes(1).Fill.UniformColor.CMYAssign 255, 100, 100
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.