Usage
Typescript Import Format
//This class is exported directly as module. To import it
import Color= require("ojs/ojcolor");
For additional information visit:
Final classes in JET
Classes in JET are generally final and do not support subclassing. At the moment, final is not enforced. However, this will likely change in an upcoming JET release.
Constructor
new Color(color)
Creates an object representing a color. The color may be defined using
the RGB, HSL, and HSV model values as an object, or as a CSS3 color specification string (refer to
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value, and also
https://www.w3.org/TR/css3-color/#svg-color for color visualization. The
CSS3 named colors are available as Color constants (e.g. Color.ALICEBLUE)
Parameters:
Name | Type | Description |
---|---|---|
color |
string | Color.RGBA | Color.HSLA | Color.HSVA |
|
Throws:
if the color specification cannot be parsed correctly.
- Type
- Error
Fields
-
(static) ALICEBLUE :Color
-
CSS3 color
aliceblue