Color gradient with a start and end color. This also defines some default color gradients.
| EMS. | Color gradient with a start and end color. |
| Properties | |
| start | {EMS.Color} |
| end | {EMS.Color} |
| Constructor | |
| EMS. | |
| Functions | |
| equals | |
| clone | {EMS.Gradient} Returns a clone of this gradient. |
| Static Functions | |
| getGradient | Static method for getting a named gradient. |
| Constants | |
| BLUE | Blue gradient. |
| GREEN | Green gradient. |
| PURPLE | Purple gradient. |
| BROWN | Brown gradient. |
| RED | Red gradient. |
var redToWhite = new Gradient(EMS.Color.RED, EMS.Color.WHITE);
var whiteToGrey = new Gradient("FFFFFF", new EMS.Color("CCCCCC"));
var whiteToBlack = new Gradient(["FFFFFF", new EMS.Color("000000"));| colors | {Mixed} can be two separate arguments which can be taken as inputs to EMS.Color or a single argument of either an {Array} or an {Object} with a start and end property. In the case of an {Array} it will use the first item as the start and last item the end color. All others are disregarded. |
equals: function( gradient )
| gradient | {Mixed} is either an EMS.Gradient or {Object} to test for equality. |
{Boolean} Returns true if the input gradient equals this gradient.
EMS.Gradient.getGradient = function( gradient )
Static method for getting a named gradient.
| gradient | {String} is the name of the gradient to try and find. |
{EMS.Gradient} if there is a gradient by the given name, otherwise it will return null.
equals: function( gradient )
{EMS.Gradient} Returns a clone of this gradient.
clone: function()
Static method for getting a named gradient.
EMS.Gradient.getGradient = function( gradient )