Previous Document Next Document

Object Model Reference : Classes : C : Color : Properties : Color.Type


Color.Type

Property Type As cdrColorType

Description

Member of Color

The Type property returns or specifies the color type 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.

The Type property returns a read-only value.

VBA example

The following VBA example converts all spot color fills of all objects on the current page to the CMYK color model.

Sub Test()
 Dim s As Shape
 For Each s In ActivePage.Shapes
  If s.Fill.Type = cdrUniformFill Then
   If s.Fill.UniformColor.Type = cdrColorSpot Or s.Fill.UniformColor.Type = cdrColorPantone Then
    s.Fill.UniformColor.ConvertToCMYK
   End If
  End If
 Next s
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.