| EMS. | |
| Properties | |
| green | {Integer} Green value of the color. |
| blue | {Integer} Blue value of the color. |
| red | {Integer} Red value of the color. |
| Constructor | |
| EMS. | |
| Functions | |
| equals | |
| clone | {EMS.Color} Returns a clone of this color. |
| toString | {String} Returns a string form of the color. |
| brigher | {EMS.Color} Returns a color that is brigher than this color. |
| darker | {EMS.Color} Returns a color that is darker than this color. |
| toHex | {String} hex representation of the color. |
| toArray | {Array} Returns the colors as an array, in the index order or red, green, blue. |
| Static Functions | |
| getColor | Static method for getting a named color. |
| Constants | |
| WHITE | |
| BLACK | |
| RED | |
| BLUE | |
| GREEN | |
| YELLOW | |
| MAGENTA | |
| CYAN |
var red = new EMS.Color("FF0000");
var blue = new EMS.Color(0, 0 255);
var green = new EMS.Color("00", "FF", "00");
var white = new EMS.Color("#FFFFFF");
var black = new EMS.Color(["00", "00", "00"]);| color | {Mixed} this is either a single {String} which is the 6 character hex value, 3 {Integer} values between 0 and 256 representing each of the color values, 3 two character hex values or an array of integers or hex characters. |
| color | {Mixed} This may be an EMS.Color, a hex {String} or just an {Object} with the three color properties set. |
{Boolean} Returns true if the input object is considered equal to this color.
toString: function()
{String} Returns a string form of the color. This actually calls EMS.Color.toHex.
{EMS.Color} Returns a color that is brigher than this color.
EMS.Color.getColor = function( color )
Static method for getting a named color.
| color | {String} is the name of the color to try and find. |
{EMS.Color} if there is a color by the given name, otherwise it will return null.
{EMS.Color} Returns a clone of this color.
clone: function()
{String} Returns a string form of the color.
toString: function()
{EMS.Color} Returns a color that is darker than this color.
darker: function()
{String} hex representation of the color.
toHex: function()
{Array} Returns the colors as an array, in the index order or red, green, blue.
toArray: function()
Static method for getting a named color.
EMS.Color.getColor = function( color )