Assign Color to a Layer
 
 
 

You can assign color to a layer. Colors are identified by the AcCmColor object. This object can hold an RGB value, an ACI number (an integer from 1 to 255), or a named color.

To assign color to a layer, use the TrueColor property.

Constants have been provided for the standard seven colors and the BYBLOCK and BYLAYER designations.

If you use acByBlock, AutoCAD draws new objects in the default color (white or black, depending on your configuration) until they are grouped into the block. When the block is inserted in the drawing, the objects in the block inherit the current setting.

If you use acByLayer, new objects assume the color of the layer upon which they are drawn.