The Color Class
The Color class provides methods for specifying the color of an object.
Member Objects: Static Member Variables
These member variables do not require an object. They are prefixed by the Color class name.
Name | Description |
---|---|
BLACK |
Specifies a Color object having the color BLACK |
BLUE |
Specifies a Color object having the color BLUE |
CYAN |
Specifies a Color object having the color CYAN |
DARK_GRAY |
Specifies a Color object having the color DARK_GRAY |
GRAY |
Specifies a Color object having the color GRAY |
GREEN |
Specifies a Color object having the color GREEN |
LIGHT_GRAY |
Specifies a Color object having the color LIGHT_GRAY |
MAGENTA |
Specifies a Color object having the color MAGENTA |
ORANGE |
Specifies a Color object having the color ORANGE |
PINK |
Specifies a Color object having the color PINK |
RED |
Specifies a Color object having the color RED |
WHITE |
Specifies a Color object having the color WHITE |
YELLOW |
Specifies a Color object having the color YELLOW |
Usage
With RTL classes, it is not possible to create and subclass objects. The
new
keyword is not supported.
The default color for a report item, such as a Layout Node, is black. You can change the color of the item by entering a value for the color or bgColor property in the Properties View. These properties are of type Color; Instead of selecting a color from the Edit Expressions color palette, you can use the members of this class in an expression that returns a Color object.
Member Objects Usage
These objects are static member variables that do not require an object instance. The variables are prefixed with the Color class name and the '.' character.
balance
is below zero, and otherwise displays
black text:balance<0?Color.RED:Color.BLACK
Class Methods
Class methods do not require a Color object instance. When you invoke a class method, it is prefixed with the Color class name and the '.' character.
Name | Description |
---|---|
|
Returns a Color object based on the specified values of hue, saturation, brightness, and (optionally) alpha for the HSB color model. |
|
Returns an sRGB Color object with the specified red, green, blue, and (optionally) alpha values. |
Object Methods
Color object methods are called on a Color object instance. Object methods require an object reference. When you invoke the method, it is prefixed with the object instance name and the "." character.
Name | Description |
---|---|
|
Brightens the Color object. |
|
Darkens the Color object. |
|
Returns the alpha component in the range 0-255. |
|
Returns the blue component in the range 0-255 in the default sRGB space. |
|
Returns the brightness value of the value in the HSB color model. |
|
Returns the green component in the range 0-255 in the default sRGB space. |
|
Returns the hue value of the value in the HSB color model. |
|
Returns the red component in the range 0-255 in the default sRGB space. |
|
Returns the RGB value representing the color in the default sRGB color model. |
|
Returns the saturation value of the value in the HSB color model. |
|
Returns a string representation in the form "#argb". |