Color Parameter in
Configurations
The design table can include a column for configuration-specific colors.
The value is a 32-bit integer that specifies RGB (red, green, blue). If
no value is specified, zero (black) is used.
If you know the 32-bit integer value of a color, you can type the number
directly into the design table in a column with the $COLOR
parameter as the header. If you do not know the 32-bit integer value,
you can calculate it in the design table with the RGB component values.
To determine
the red, green, and blue components of a color:
Click Edit Appearance (Standard
toolbar) or Edit, Appearance,
Appearance.
In the
PropertyManager, under Color Properties:
Click
a color in the palette.
Select
RGB.
Note
the component numbers next to Red Component
of Color , Green
Component of Color , and Blue
Component of Color .
Click .
To calculate a color value in
a design table:
Click Insert, Tables,
Design Table.
In the
Design Table PropertyManager, choose the
design table settings, then click .
In the
design table:
-
Type $USER_NOTES
in cells B2, C2, and D2, and type $COLOR
in cell E2. The column header is not
case sensitive.
You may
have to insert columns so that these parameters appear in cells B2 through
E2.
Type
integers in cells B3, C3, and D3 for the red, green, and blue components
of a color. The values must be stored as numbers, not text.
-
Type the following formula
in cell E3:
=
MAX(MIN(B3,255),0) + MAX(MIN(C3,255),0)*16*16 + MAX(MIN(D3,255),0)*16*16*16*16
The formula ensures that
each component value is between zero and 255.
Make
sure there are no extra spaces before the = sign in the cell.
-
Type other color components
in the appropriate rows and copy the formula, adjusted for the row number,
into the corresponding cells in column E.
The following table lists
some typical colors, their components, and the equivalent integer values.
Color |
Red |
Green |
Blue |
Integer |
Black |
0 |
0 |
0 |
0 |
Red |
255 |
0 |
0 |
255 |
Orange |
255 |
128 |
0 |
33023 |
Green |
0 |
255 |
0 |
65280 |
Blue |
0 |
0 |
255 |
16711680 |
Purple |
255 |
128 |
255 |
16744703 |
Turquoise |
0 |
255 |
255 |
16776960 |
White |
255 |
255 |
255 |
16777215 |
The configuration specific
color applies to shaded mode only unless you select Apply
same color to wireframe, HLR and shaded in Document Color Options.