rgb() (Function)

A special color definition function used in style sheet color specifications.

Availability:

JavaScript - 1.5
JScript - 3.0
Internet Explorer - 4.0
Netscape - 6.0
JavaScript syntax:-rgb(rValue gValue bValue)
Argument list:bValueBlue intensity
gValueGreen intensity
rValueRed intensity

The values are separated by spaces and you must specify all three. This value can then be used in the property assignment for a style property that controls color. You can use it in any position where a color value would be used.

See also:Color value, style.backgroundColor, style.borderColor, style.color, style.outlineColor