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.
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:
- Click the arrowhead button to bring the next set of 16 color slots into view. They are all defined as black, initially.
- 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:
![]()
- 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.
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:
![]()
- 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.
- When the color is correct, click Add to Custom Colors to preserve it:
![]()
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |