Hide Table of Contents
esri
esri/arcgis
esri/dijit
esri/dijit/analysis
esri/dijit/geoenrichment
esri/dijit/geoenrichment/ReportPlayer
esri/geometry
esri/layers
esri/renderers
esri/symbols
esri/tasks
esri/tasks/datareviewer
esri/tasks/geoenrichment
esri/tasks/locationproviders
dojo.require("esri.Color");
| Name | Summary |
|---|---|
| new esri.Color(color?) | Creates a new Color object. |
| Name | Description |
|---|---|
named | Dictionary list of all CSS named colors, by name. Values are 3-item arrays with corresponding RG and B values. |
| Name | Type | Summary |
|---|---|---|
| a | Number | The alpha value. |
| b | Number | The blue value. |
| g | Number | The green value. |
| r | Number | The red value. |
| Name | Return type | Summary |
|---|---|---|
| blendColors(start, end, weight, obj?) | Color | Blend colors start and end with weight from 0 to 1, 0.5 being a 50/50 blend. |
| fromArray(a, obj?) | Color | Builds a Color from a 3 or 4 element array, mapping each element in sequence to the rgb(a) values of the color. |
| fromHex(color, obj?) | Color | Converts a hex string with a '#' prefix to a color object. |
| fromRgb(color, obj?) | Color | Returns a Color instance from a string of the form "rgb()" or "rgba()". |
| fromString(str, obj?) | Color | Parses str for a color value. |
| setColor(color) | Color | Takes a named string, hex string, array of rgb or rgba values, an object with r, g, b, and a properties, or another Color object and sets this color instance to that value. |
| toCss(includeAlpha?) | String | Returns a css color string in rgb(a) representation. |
| toHex() | String | Returns a CSS color string in hexadecimal representation. |
| toRgb() | Number[] | Returns a 3 component array of rgb values. |
| toRgba() | Number[] | Returns a 4 component array of rgba values. |
<> color |
Optional | A named string, hex string, array of rgb or rgba values, an object with r, g, b, and a properties, or another Color object.
|
Note: This is a static method.
ColorNote: This is a static method.
ColorNote: This is a static method.
ColorNote: This is a static method.
ColorNote: This is a static method.
Acceptable input values for str may include arrays of any form accepted by dojo.colorFromArray, hex strings such as "#aaaaaa", or rgb or rgba strings such as "rgb(133, 200, 16)" or "rgba(10, 10, 10, 50)".ColorColor