Previous Document Next Document

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


Color.CMYKAssign

Sub CMYKAssign(Cyan As Long, Magenta As Long, Yellow As Long, Black As Long)

Description

Member of Color

The CMYKAssign property assigns the CMYK color model in CorelDRAW. All four color components are applied in one step, and the color model is set to CMYK.

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.

CMYK is a color mode made up of cyan (C), magenta (M), yellow (Y), and black (K). In the CMYK color mode, color values are expressed as percentages, so a value of 100 for an ink means that it is applied at full saturation. Used in most full-color commercial printing, CMYK is like CMY, but the addition of black (K) allows for true blacks and a wider tonal range. The CMYK color mode is based on the CMYK color model.

Parameter
Description
Cyan
Specifies the level of cyan in the CMYK color model
Values are percentages and range from 0 to 100.
Magenta
Specifies the level of magenta in the CMYK color model
Values are percentages and range from 0 to 100.
Yellow
Specifies the level of yellow in the CMYK color model
Values are percentages and range from 0 to 100.
Black
Specifies the level of black in the CMYK color model
Values are percentages and range from 0 to 100.

VBA example

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

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.