A module which augments the base dojo/_base/Color class with additional methods and named colors. This is not included in base Dojo by default for size reasons.


New methods are provided by this module.

 creates a greyscale color with an optional alpha
 get the rgb(a) array from css-style color declarations


In addition to providing some color-specific functionality, the dojo.colors module mixes all named css3 colors and SVG 1.0 variant spellings into dojo.Colors.named, such as aliceblue, azure and so on.

The module also adds a sanitize method to dojo.Color.prototype. This method ensures the Color object has the correct attributes, and are valid.

Table of Contents

Error in the documentation? Can’t find what you are looking for? Let us know!