Progress
AppBuilder
Developer’s Guide


Defining New Colors

Although the defacto industry standard today is 256 colors (8 bits/pixel) and rapidly moving higher, the default MS-Windows color table has only 16 slots (4 bits/pixel). AppBuilder's color table has a total of 256 slots, numbered 0 through 255. Only slots 0 through 15 have colors defined on them by default, and those colors match the default MS-Windows set, as shown in Table A–1.

Table A–1: Progress Color Table
Slot
Progress Color Name
Red-Green-Blue (RGB) Values
   
Decimal
Hex
0
Black
0
0
0
0
0
0
1
Dark Blue
0
0
128
0
0
80
2
Dark Green
0
128
0
0
80
0
3
Blue Green
0
128
128
0
80
80
4
Red
128
0
0
80
0
0
5
Purple
128
0
128
80
0
80
6
Olive
128
128
0
80
80
00
7
Gray
128
128
128
80
80
80
8
Light Gray
192
192
192
C0
C0
C0
9
Blue
0
0
255
00
00
FF
10
Green
0
255
0
00
FF
00
11
Turquoise
0
255
255
00
FF
FF
12
Red
255
0
0
FF
00
00
13
Pink
255
0
255
FF
00
FF
14
Yellow
255
255
0
FF
FF
00
15
White
255
255
255
FF
FF
FF

You can increase the colors available to your application—for example, to create a special corporate color scheme—by defining colors on slots 16 through 255 (16 through 127 for character mode), although not all objects can accept colors from slots above 15. You can also change the colors defined for slots 0 through 15 (for example, substituting a green for a red), though for compatibility reasons this is discouraged.

Note that changes made to the color table are permanent the moment they are made. Clicking Cancel does not discard the changes. To restore earlier colors, you must recreate them.

To add a new color to the table, follow these steps:

  1. Click the arrowhead button to bring the next set of 16 color slots into view. They are all defined as black, initially.
  2. Double-click the first undefined slot (slot 16, unless you have already defined additional colors for this application, or for another application during this Progress session). It does not matter whether you click the foreground or the background slot—they are really the same slot, and when you define a color, it appears in both places. The standard Windows color-editor dialog box opens:
  3. If none of the existing colors meets your needs, you can modify any or all of the 16 colors in the Custom colors bank. These are not the same 16 colors that appear in the default slots. Click on the color you wish to modify.
  4. The color in that cell will immediately appear in the large Color/Solid swatch, its HSL and RGB values (HSL and RGB are just different color-notation schemes) appears in the readouts, and the cursors showing where the color is in the color space will reposition themselves appropriately, as shown here:

  5. To create the new color, you can:
    • Move the cursors to new positions in the rainbow color space. The larger space represents the qualities of Hue (red, green, etc.) and Saturation/Intensity (bright, rich color versus muted, grayish color). The long, narrow space to the right represents Luminance or Value (in paint or printer's ink, the amount of white or black (but not both) in the color; on a monitor, the amount of energy exciting the phosphor).
    • Set the HSL or RGB values explicitly. This is a particularly useful method if you are trying to work to a known standard, or reproduce colors for which you know those values.
  6. When the color is correct, click Add to Custom Colors to preserve it:
  7. If you wish to define additional custom colors, select another Custom Color cell and repeat Step 4 and Step 5. When you are finished, select a color cell and click OK. The color editor dialog box closes, and the selected color is assigned to the color table.

Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095