发信人: notbig(老奀)
整理人: leitiger(2002-06-11 11:30:38), 站内信件
|
This is a color conversion chart. PowerBuilder help gives the RGB values for the standard 16 colors and then proceeds to take long values as input everywhere in the system.
Using the long values is also faster than using the RGB function, since PowerBuilder does not have to multiply the RGB numbers to calculate the long value. It will also save you a few bytes.
Color Red Green Blue Long
Black 0 0 0 0
White 255 255 255 16777215
Gray 192 192 192 12632256
Dark Grey 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
The formula to generate the long value is: (65536 * Blue) + (256 * Green) + (Red)
Note on system colors: When you assign a system color to an object and export it, the value is adjusted to your current display properties. Also, not every system color is fully supported by PowerBuilder.
---- [email protected]
|
|