Object Model Reference : Classes : C : Color : Methods : Color.ConvertToLab |
Sub ConvertToLab()
Member of Color
The ConvertToLab method converts the active color model to the LAB color model in CorelDRAW.
A color is an effect applied to an object that alters the objects 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 LAB color model is a color model created by the Commission Internationale de lEclairage (CIE). It contains a luminance (or lightness) component (L) and two chromatic components: a (green to red) and b (blue to yellow). The LAB color mode is based on the LAB color model.
The following VBA example converts all uniform fill colors in the selected shapes to the LAB color model.
Sub Test() |
Dim c As New color |
Dim s As Shape |
For Each s In ActiveSelection.Shapes |
If s.Fill.Type = cdrUniformFill Then |
s.Fill.UniformColor.ConvertToLab |
End If |
Next s |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.