Previous Document Next Document

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


Color.LabAssign

Sub LabAssign(L As Long, A As Long, B As Long)

Description

Member of Color

The LabAssign method assigns the LAB color model in CorelDRAW. All three color components are applied in one step, and the color model is set to LAB.

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 LAB color model is a color model created by the Commission Internationale de l’Eclairage (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.

Parameter
Description
L
Specifies the luminance, or brightness, value in the LAB color model. Values range from 0 to 255.
A
Specifies one of two chromatic components in the LAB color model. “A” refers to a range of colors between green and red.
B
Specifies one of two chromatic components in the LAB color model. “B” refers to a range of colors between blue and yellow.

VBA example

The following VBA example fills all shape objects with the LAB gray color.

Sub Test()
 Dim s As Shape
 For Each s In ActivePage.Shapes
  If s.Fill.Type = cdrUniformFill Then
   s.Fill.UniformColor.LabAssign 128, 0, 0
  End If
 Next s
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.