Color |

Color types represent an AutoCAD color in the range 1 through 256, including the "logical" ByLayer colors 0 and 256, respectively. In OpenDCL, additional logical colors can be specified by negative values, as shown in the following table. If the color value is outside the range of logical and AutoCAD colors, it is interpreted as a bit coded RGB color value.

A color may also be represented by a list of three integers in the range 0 - 255 representing the Red, Green, and Blue components of the color in the form (Red Green Blue).

To convert an AutoCAD color to an OLEColor for use with an ActiveX object, use the GetOLEColorValue function.

Color Value | Description
--- | ---
-24 | Transparent (background color shows through)
-23 | AutoCAD layout background color
-22 | AutoCAD model space background color
-21 | Windows button highlight color
-20 | Windows inactive caption color
-19 | Windows button text color
-18 | Windows grayed text color
-17 | Windows button shadow color
-16 | Windows button face color
-15 | Windows highlighted text color
-14 | Windows highlight color
-13 | Windows application workspace color
-12 | Windows inactive border color
-11 | Windows active border color
-10 | Windows caption text color
-9 | Windows window text color
-8 | Windows menu text color
-7 | Windows window frame color
-6 | Windows default window color
-5 | Windows menu color
-4 | Windows inactive caption color
-3 | Windows active caption color
-2 | Windows desktop color
-1 | Windows scroll bar color
0 | Black
1 | Red
2 | Yellow
3 | Green
4 | Cyan
5 | Blue
6 | Magenta
7 | White
8 - 255 | AutoCAD color table color
256 | AutoCAD ByLayer color (i.e. default color of current layer)
> 256 | Color is interpreted as an RGB color (see OLEColor type)