API Reference > OdCm Classes > OdCmColor Class > OdCmColor Constructor > OdCmColor::OdCmColor Constructor (OdCmEntityColor::ColorMethod)
OdCmColor::OdCmColor Constructor (OdCmEntityColor::ColorMethod)
Syntax
C++
OdCmColor(OdCmEntityColor::ColorMethod color);
Parameters 
Description 
OdCmEntityColor::ColorMethod color 
[in] Color method. 

Constructor. Sets the color according to a color method. 

 

The color method can be one of the following: 

 

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 reference color. 
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). 
Copyright © 2002–2020. Open Design Alliance. All rights reserved.