Share

AcDbEntity::color

C++

AcCmColor color() const;

Description

This function returns the full true color information for the entity within an instance of AcCmColor.

The index value will be in the range 0 to 256. 0 and 256 are special values.

0 indicates the entity uses the color of the BlockReference that's displaying it. If the entity is not displayed through a BlockReference (for example, it's directly owned by the model space BlockTableRecord) and its color is 0, then it will display as though its color were 7.

256 indicates the entity uses the color specified in the LayerTableRecord it references.

Note The AcDbEntity::colorIndex() method is a more direct method to access just the AutoCAD color number of the entity.

Links

AcDbEntity

Was this information helpful?