Previous Document Next Document

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


Application.CreateCMYColor

Function CreateCMYColor(Cyan As Long, Magenta As Long, Yellow As Long) As Color

Description

Member of Application

The CreateCMYColor method creates a new color object 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 magenta in the CMY color model. Values range from 0 to 255.

Example

Here is a code example:

Sub CreateColorExample()
CreateDocument
Dim sFace As Shape
Set sFace = ActiveLayer.CreateEllipse(1, 10, 8, 1.5)
sFace.Fill.UniformColor = CreateCMYKColor(0, 0, 100, 0) 'Create a yellow fill
Dim sEyeLeft As Shape
Set sEyeLeft = ActiveLayer.CreateEllipse2(3.25, 7.25, 1, -1)
sEyeLeft.Fill.UniformColor = CreateBWColor(True) 'Create a white fill
Dim sEyeRight As Shape
Set sEyeRight = ActiveLayer.CreateEllipse2(6, 7, 1, -1)
sEyeRight.Fill.UniformColor = CreateRGBColor(255, 255, 255) 'Create a white fill
Dim sEyeLeftPupil As Shape
Set sEyeLeftPupil = ActiveLayer.CreateEllipse2(3.5, 7, 0.35, -0.4)
sEyeLeftPupil.Fill.UniformColor = CreateBWColor(False)
Dim sEyeRightPupil As Shape
Set sEyeRightPupil = sEyeLeftPupil.Clone
sEyeRightPupil.Fill.ApplyFountainFill CreateHSBColor(210, 10, 10), CreateGrayColor(72), cdrConicalFountainFill
sEyeRightPupil.Move 2.75, -0.35
Dim sNose As Shape
Set sNose = ActiveLayer.CreateEllipse2(4.3, 5.4, -0.75, -0.5)
sNose.Rotate -10
sNose.Fill.ApplyFountainFill CreateCMYColor(0, 255, 255), CreateHLSColor(0, 75, 75), cdrRadialFountainFill
Dim sMouth As Shape
Set sMouth = ActiveLayer.CreateEllipse2(4.2, 3.75, 1.75, 0.75, 0, 180, True)
sMouth.Rotate -15
sMouth.Fill.ApplyFountainFill CreateYIQColor(97, 97, 100), CreateLabColor(215, -1, -2), cdrSquareFountainFill
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.