Representing a color using Java™
The ColorObject class allows you to represent a Domino® color so that you can access its Domino® value, RGB (red, green, blue) value, and HSL (hue, saturation, luminance) value as properties. Use the createColorObject method of Session to establish the object.
The following table lists the ColorObject properties.
Property |
Data type |
Description |
---|---|---|
Blue through getBlue |
int |
(Read-only) Blue RGB value 0-255. |
Green through getGreen |
int |
(Read-only) Green RGB value 0-255. |
Hue through getHue |
int |
(Read-only) Hue HSL value 0-240. |
Luminance through getLuminance |
int |
(Read-only) Luminance HSL value 0-240. |
NotesColor through getNotesColor and setNotesColor |
int |
Domino® color value. |
Red through getRed |
int |
(Read-only) Red RGB value 0-255. |
Saturation through getSaturation |
int |
(Read-only) Saturation HSL value 0-240. |
Domino® color values are in the range 0-240. Setting NotesColor sets the RGB and HSL properties to values that correspond to the Domino® color value. You can base the color properties on HSL and RGB values through the methods setHSL and setRGB.
The following properties and methods use Domino® color values:
- RichTextSection: BarColor, setBarColor
- RichTextStyle: NotesColor
- RichTextTable: AlternateColor, Color, setAlternateColor, and setColor