API Documentation > CorelDRAW > 2025-v26 > Application > IVGApplication
Application.CreateColor method
Creates a color object
Syntax:
Function CreateColor(Optional ByVal ColorString As String) As Color
Parameters:
Name Type Description
ColorString
String
Remarks:
The CreateColor method creates a color object with default color properties. This function is now obsolete because the Color object can be used with the New keyword.
Examples:
The following VBA examples show several ways to apply a cyan fill to the first selected object in the active document.
Sub CreateColor1()
Dim c As Color
Set c = CreateColor
c.CMYKAssign 100, 0, 0, 0
ActiveDocument.Selection.Shapes(1).Fill.ApplyUniformFill c 
End Sub Sub CreateColor2()
Dim c As New Color
c.CMYKAssign 100, 0, 0, 0
ActiveSelection.Shapes(1).Fill.ApplyUniformFill c 
End Sub Sub CreateColor3()
ActiveShape.Fill.UniformColor.CMYKAssign 100, 0, 0 ,0 
End Sub