BBjAPI::makeColor
Description
In BBj 4.00 and higher, this method creates a BBjColor object from the specified parameters.
Syntax
Return Value |
Method |
---|---|
makeColor(int colorNum) |
|
makeColor(int red, int green, int blue) |
|
makeColor(string colorName) |
|
makeColor(int red, int green, int blue, int alpha) |
Parameters
Variable |
Description |
|
---|---|---|
colorName |
Should be one of the names "BLACK", "BLUE", "RED", "MAGENTA", "GREEN", "CYAN", "YELLOW", "WHITE", "DKGRAY", "GRAY" or "LTGRAY". Using any other name returns null. |
|
colorNum |
A constant accessed from the BBjSysGui or BBjAPI object. |
|
|
Color BLACK BLUE RED MAGENTA GREEN CYAN YELLOW WHITE DKGRAY GRAY LTGRAY |
Number 0 1 2 3 4 5 6 7 8 9 10 |
red |
Specifies the red value. The value can be in the range 0-255. |
|
green |
Specifies the green value. The value can be in the range 0-255. |
|
blue |
Specifies the blue value. The value can be in the range 0-255. |
|
alpha |
In BBj 17 and higher, specifies the alpha value. The value can be in the range 0-255. |
Return Value
All versions of the makeColor method return a BBjColor object.
Remarks
When using the colorNum parameter, make sure the color number constant is entered in all uppercase letters.
Example
|
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.