Functiondojo.colorFromArray

<script src="../../js/dojo.js"></script>
defined in dojo/_base/Color.js

builds a color from 1, 2, 3, or 4 element array

Usage

function (/*Array*/ a, /*dojo.Color?*/ obj) (view source)
parametertypedescription
aArray 
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