PowerBuilder – Color settings

Posted on Tuesday, August 31st, 2010 at 8:20 pm in

There are still many Powerbuilder web sites with this information but it is an invaluable resource unless you are the kind of person who can memorize these things.

This is a color conversion chart that gives the RGB values for the standard 16 colors and some of the system colors.

Color        Red  Green  Blue   Long
Black          0     0    0      0
White        255   255  255    16777215
Gray         192   192  192    12632256
Dark Gray    128   128  128     8421504
Red          255     0    0         255
Dark Red     128     0    0         128
Green          0   255    0       65280
Dark Green     0   128    0       32768
Blue           0    0   255    16711680
Dark Blue      0    0   128     8388608
Magenta      255    0   255    16711935
Dark Magenta 128    0   128     8388736
Cyan           0  255   255    16776960
Dark Cyan      0  128   128     8421376
Yellow       255  255     0       65535
Brown        128  128     0       32896

System Colors:

Windows Text          2^25 = 33554432
Button Face           2^26 = 67108864
Scrollbar             2^27 = 134217728
Application Workspace 2^28 = 268435456
Transparent           2^29 = 536870912
Windows Background    2^30 = 1073741824

RGB Formula
The formula to generate the long value is: (65536 * Blue) + (256 * Green) + (Red)

Top