API Reference > OdCm Classes > OdCmEntityColor Class
OdCmEntityColor Class
OdCmEntityColor
Syntax
C++
class OdCmEntityColor;

CmColorBase.h

 

This class implements the entity color object that represents the unnamed colors specified by the byLayer, byBlock, byColor, byACI, byPen, Foreground, byDgnIndex, or None color methods.

The entity color object can specify any of the following color methods: 

 

Name 
Value 
Description 
kByLayer 
0xC0 
Color is specified by the layer object on which the object resides. 
kByBlock 
0xC1 
Color is specified by the block object in which the object is contained. 
kByColor 
0xC2 
Color is specified by an RGB value. 
kByACI 
0xC3 
Color is specified by an index (ACI) of a color palette. 
kByPen 
0xC4 
Color is specified by an index of a pen color table. 
kForeground 
0xC5 
Color is the same as the foreground color. 
kByDgnIndex 
0xC7 
Color is specified by an index of a .dgn color table. 
kNone 
0xC8 
Color is absent (object is clear). 

 

An entity has no color from the time it is first instantiated until it is assigned one or added to a database. The ColorMethod enumeration defines the constants for color methods.

 
Name 
Description 
 
This is the overview for the OdCmEntityColor constructor overload. 
 
Name 
Description 
 
mLUT 
Maps the colors between ACI values and RGB values. 
 
Name 
Description 
 
Represents color indices for the ACI color method. 
 
Represents the RGB color components. 
 
Represents the color method. 
 
Name 
Description 
 
blue 
This is the overview for the blue method overload. 
 
This is the overview for the color method overload. 
 
This is the overview for the colorIndex method overload. 
 
This is the overview for the colorMethod method overload. 
 
This is the overview for the green method overload. 
 
This is the overview for the isByACI method overload. 
 
This is the overview for the isByBlock method overload. 
 
This is the overview for the isByColor method overload. 
 
This is the overview for the isByDgnIndex method overload. 
 
This is the overview for the isByLayer method overload. 
 
This is the overview for the isForeground method overload. 
 
This is the overview for the isNone method overload. 
 
Converts the RGB value specified by the red, green, and blue components to an ACI value.
 
 
Converts the specified color index (ACI value) to an RGB value. 
 
red 
This is the overview for the red method overload. 
 
This is the overview for the setBlue method overload. 
 
This is the overview for the setColor method overload. 
 
This is the overview for the setColorIndex method overload. 
 
This is the overview for the setColorMethod method overload. 
 
Sets the .dgn color index (DgnIndex) of a color palette and sets the color method to byDgnIndex for the entity color object.
 
 
This is the overview for the setGreen method overload. 
 
This is the overview for the setRed method overload. 
 
This is the overview for the setRGB method overload. 
 
This is the overview for the setTrueColor method overload. 
 
This is the overview for the setTrueColorMethod method overload. 
 
This is the overview for the trueColor method overload. 
 
This is the overview for the trueColorMethod method overload. 
Name 
Description 
RGBM 
Represents the combined value of the color and color method. 
 
Name 
Description 
 
!= 
Compares two entity color objects as integer values, and returns true when their values are not equal or false when their values are equal. 
 
= 
Copies an entity color object specified on the right of the operator to the entity color object specified on the left. 
 
== 
Compares two entity color objects as integer values, and returns true when their values are equal or false when their values are not equal. 
Copyright © 2002–2020. Open Design Alliance. All rights reserved.