dundas.controls.Color Class

Represents a color.
 

Inheritance Hierarchy

 
Class
   dundas.controls.Cloneable
      dundas.controls.Color
 

Constructors

 
  Name Description
init Initializes the color. Called during construction.
 
 

Properties

 
  Name Description
a Gets or sets the alpha component of the color.
argb Gets or sets the alpha, red, green, blue components of the color.
b Gets or sets the blue component of the color.
brightness Gets or sets the brightness component of the color.
g Gets or sets the green component of the color.
hue Gets or sets the hue component of the color.
r Gets or sets the red component of the color.
rgb Gets or sets the red, green, blue components of the color.
saturation Gets or sets the saturation component of the color.
 
 

Methods

 
  Name Description
applyToElement Applies this color to an element.
clone Creates a clone of this color.

Static
findColorObjectByName Returns a named color by name, if available.

Static
findColorObjectByValue Returns a named color from its RGB value, if available.
fromJObject Applies the property values from a plain object created from JSON to the properties of this instance. Inherited from Class.

Static
fromObject Parses a color from an object.

Static
fromString Parses a color from a string.
normalizedAlpha Returns the normalized alpha value of the color ranging from 0 to 1.

Static
parse Parses a color from a string.
setHsb Sets the hue, saturation, and brightness of the color.
toCss Returns the CSS representation of the color.
toJSON Implementation for toJSON to return an object that will include this class's prototype property values when stringified. Inherited from Class.
toString Creates a string representation of this color.