API Reference > OdCm Classes > OdCmColor Class > OdCmColor Methods > OdCmColor::setColorIndex Method
OdCmColor::setColorIndex Method
Syntax
C++
virtual void setColorIndex(OdUInt16 colorIndex);
Parameters 
Description 
OdUInt16 colorIndex 
[in] An integer value that is the index of the color in a palette. 

Sets the color index (ACI) of a color palette and sets the color method to byACI for the entity color object. 

 

The color index can be one of the following: 

 

Name 
Value 
Description 
kACIbyBlock 
Sets the color method to byBlock. 
kACIRed 
Red. 
kACIYellow 
Yellow. 
kACIGreen 
Green. 
kACICyan 
Cyan. 
kACIBlue 
Blue. 
kACIMagenta 
Magenta. 
kACIforeground 
Sets the color method to Foreground. 
.. 
8-255 
Defined by current palette. 
kACIbyLayer 
256 
Sets the color method to byLayer. 
kACInone 
257 
Sets the color method to None. 

 

An entity does not have a color from the time it is first instantiated until it is assigned one or added to a database.

Copyright © 2002–2020. Open Design Alliance. All rights reserved.