About Working with Colors (VBA/ActiveX)

You can assign true colors to individual objects in a drawing using the AcCmColor object.

Using an RGB value in the AcCmColor object, you can choose from millions of colors when you set the color of lines, circles, and other individual objects. The AcCmColor object also contains methods and properties for specifying color names, color books, color indexes, color values, and color methods.

You can also assign colors to layers. Each color can be identified by a name or an AutoCAD Color Index (ACI) number, an integer from 1 through 255. Any number of objects and layers can have the same color number. You can assign each color number to a different pen on a pen plotter or use the color numbers to identify certain objects in the drawing, even though you cannot see the colors on your screen.

When specifying a color, you can enter the name of the color or its ACI number. The ACI provides 255 color numbers. Standard color names are available only for colors 1 through 7.

Colors 1 through 7
Color number Color name
1 Red
2 Yellow
3 Green
4 Cyan
5 Blue
6 Magenta
7 Black/White

Colors 8 through 255 must be assigned by a number or by selecting the color in a dialog box. The default color (7) is either white or black, depending on your background color.