Create a report design document / RTL Class Reference |
The Color class provides methods for specifying the color of an object.
Color
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 |
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 LayoutNode, 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.
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.
Color.RED
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 |
---|---|
fromHSBA( h Numeric, s Numeric, b Numeric ) |
Returns a Color object based on the specified values of hue,
saturation, and brightness for the HSB color model.Color.fromHSBA(h,s,b)
|
fromHSBA( h Numeric, s Numeric, b Numeric, a Numeric) |
Returns a Color object based on the specified values of hue,
saturation, brightness, and alpha for the HSB color
model.Color.fromHSBA(h,s,b,a)
|
fromRGBA( r Numeric, g Numeric, b Numeric) |
Returns an opaque sRGB Color object with the specified red, green,
and blue
values.Color.fromRGBA(r,g,b)
Alpha defaults to 1.0. The color used depends on the best match from the colors available for the output device. |
fromRGBA( r Numeric, g Numeric, b Numeric, a Numeric) |
Returns an sRGB Color object with the specified red, green, blue,
and alpha values.
fromRGBA(r,g,b,a)
The color used depends on the best match from the colors available for the output device. |
Color.fromRGBA(0.5,0.5,0.5,0.5)
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 |
---|---|
brighter() |
Brightens the Color object. Creates a brighter version of the Color object by applying an arbitrary scale factor to each of the RGB components. Invoking a series of invocations of the darker and brighter methods might give an inconsistent result because of rounding errors. |
darker() |
Darkens the Color object. Creates a darker version of the Color object by applying an arbitrary scale factor to each of the RGB components. Invoking a series of invocations of the darker and brighter methods might give an inconsistent result because of rounding errors. |
getAlpha() |
Returns the Numeric alpha component in the range 0-255. |
getBrightness() |
Returns the Numeric brightness value of the value in the HSB color model |
getBlue() |
Returns the Numeric blue component in the range 0-255 in the default sRGB space. |
getGreen() |
Returns the Numeric green component in the range 0-255 in the default sRGB space. |
getRGBA() |
Returns the Numeric RGB value representing the color in the default sRGB color model. Bits 24-31 are alpha, 16-23 are red, 8-15 are green, and 0-7 are blue. |
getHue() |
Returns the hue value of the value in the HSB color model. |
getRed() |
Returns the Numeric red component in the range 0-255 in the default sRGB space. |
getSaturation() |
Returns the saturation value of the value in the HSB color model. |
toString() |
Return a string representation in the form "#argb". |
Color.RED.darker()