Functiondojo.colorFromRgb


rgba, hsl, hsla, including rgb(a) with percentage values.

this function can handle all 4 CSS3 Color Module formats: rgb,

Usage

function (/*String*/ color, /*dojo.Color?*/ obj)
parametertypedescription
colorString 
objdojo.ColorOptional. takes a named string, hex string, array of rgb or rgba values, an object with r, g, b, and a properties, or another dojo.Color object
fieldtypedescription
.r 
.sanitizeFunctionmakes sure that the object has correct attributes
.setColorFunctiontakes a named string, hex string, array of rgb or rgba values, an object with r, g, b, and a properties, or another dojo.Color object
.toCssFunctionreturns a css color string in rgb(a) representation
.toHexFunctionreturns a css color string in hexadecimal representation
.toRgbFunctionreturns 3 component array of rgb values
.toRgbaFunctionreturns a 4 component array of rgba values
.toStringFunctionreturns a visual representation of the color
._setFunction