Red (NotesColorObject - JavaScript)

Read-only. The red component of the color's RGB value.

Defined in

NotesColorObject

Syntax

getRed() : int

Usage

If you write to NotesColor, this property changes to reflect the Domino® color.

This property is in the range 0-255.

Language cross-reference

Red property in LotusScript® NotesColorObject class

Red property in Java ColorObject class

Examples

This button gets a Domino® color code from a scoped variable bound to an input box control. It assigns to scoped variables bound to other input box controls the RGB and HSL values of the color.
var color = session.createColorObject();
try {
		 if (isNaN(requestScope.notescolor)) throw ("NotesColor value must be numeric");
		 var notescolor = parseInt(requestScope.notescolor, 10);
		 if (notescolor < 0 || notescolor > 240) throw ("NotesColor value must be 0 - 240");
		 color.setNotesColor(notescolor);
		 requestScope.red = color.getRed().toFixed();
		 requestScope.green = color.getGreen().toFixed();
		 requestScope.blue = color.getBlue().toFixed();
		 requestScope.hue = color.getHue().toFixed();
		 requestScope.saturation = color.getSaturation().toFixed();
		 requestScope.luminance = color.getLuminance().toFixed();
		 requestScope.status = "Success";
} catch(e) {
		 requestScope.status = e.toString();
}