Name

RGBColor — a CSS color value

Availability

DOM Level 2 CSS

Properties

readonly CSSPrimitiveValue blue

The blue component of the color.

readonly CSSPrimitiveValue green

The green component of the color.

readonly CSSPrimitiveValue red

The red component of the color.

Description

This interface represents a color specified in the RGB color space. The properties are CSSPrimitiveValue objects that specify the values of the red, green, and blue components of the color. Each CSSPrimitiveValue holds a number in the range 0-255 or a percentage in the range 0 -100%.

See Also

Returned by

CSSPrimitiveValue.getRGBColorValue( )

Get JavaScript: The Definitive Guide, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.