Represents an ARGB (alpha, red, green, blue) encoded color object.
Implements
- I
Remarks
This is a convertible type that can be used with the following notation(s) in parameter lists, parameter objects or setters.
CSS color strings are converted to Colors. For example:
'blue'
'#369'
'#336699'
'rgb(51, 102, 153)'
'rgba(51, 102, 153, 0.5)'
'hsl(225, 98%, 60%)'
'hsla(225, 98%, 60%, 0.5)'See Also
Developer's Guide
Members
Show:
Constructors
Initializes a new instance of the Color class.
Initializes a new instance of the Color class.
Parameters
- r?: number
- The red value;
0by default. - g?: number
- The green value;
0by default - b?: number
- The blue value;
0by default. - a?: number
- The alpha value;
255by default.
Properties
The value is between 0 and 255. If this component is 0, then the color will be transparent.
readonlyfinal
The value is between 0 and 255. A higher value represents a higher part of the color is made up of this component.
readonlyfinal
The value is between 0 and 255. A higher value represents a higher part of the color is made up of this component.
readonlyfinal
Methods
Assigns the fill defined by this instance to the given SVG element.
Assigns the fill defined by this instance to the given SVG
element.If this Fill is a gradient and implements the ISvgDefsCreator interface, it will be added to the defs section of the SVG document per the context. The fill of the given element will be set to a reference to the gradient element.
This method is very similar in functionality to its static method counterpart setFill. However since this method is an instance method, it cannot be called on empty/null fills. If you are unsure whether the reference actually points to an instance, use the static helper method instead.
final
Parameters
- element: SVGElement
- The element whose fill should be set.
- context: ICanvasContext
- The context.
See Also
API
- setFill
Defined in
Fill.applyTofinal
Parameters
- obj: any
- The other.
Return Value
- boolean
true, if this color is equal to the other object;false, otherwise.
Freezes and returns this instance.
Freezes and returns this instance.
Freezing an object makes it immutable, which can result in performance enhancements.
Return Value
- Fill
- This instance, made immutable.
Defined in
Fill.freezefinal
Return Value
- number
- A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
Constants
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
staticreadonly
See Also
Developer's Guide
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
This method will yield the same value for every call because it is immutable.
staticreadonly
Static Methods
Creates a new color instance from HSL and A values.
Creates a new color instance from HSL and A values.
This works similar to the CSS hsla function.
static
Parameters
- h: number
- The hue value between 0 and 1.
- s: number
- The saturation value between 0 and 1.
- l: number
- The lightness value between 0 and 1.
- a?: number
- The alpha value between 0 and 1. 1 if omitted
Return Value
- Color
- A new color instance with the given values.
Creates a new color instance from RGB and A values.
Creates a new color instance from RGB and A values.
This works similar to the CSS rgba function.
static
Parameters
- r: number
- The red value between 0 and 255.
- g: number
- The green value between 0 and 255.
- b: number
- The blue value between 0 and 255.
- a?: number
- The alpha fractional value between 0 and 1. 1 if omitted
Return Value
- Color
- A new color instance with the given values.