| Package | graphics.colors |
| Class | public class HSL |
| Inheritance | HSL Object |
| Implements | ColorSpace |
Hue is what is seen as the color. Hue is represented as an angle of the color circle and this angle is so typically measured in degrees.
Saturation is how “pure” the color is. 0% is grey and 100% is a pure color.
Lightness represents the lightness component of the color..
| Property | Defined By | ||
|---|---|---|---|
| h : Number
The hue component (between 0 and 360). | HSL | ||
| l : Number
The lightness value component of the hsl color (between 0 and 1). | HSL | ||
| s : Number
The saturation component (between 0 and 1). | HSL | ||
| Method | Defined By | ||
|---|---|---|---|
HSL(h:Number = 0, s:Number = 0, l:Number = 0)
Creates a new HSL instance. | HSL | ||
clone():*
Creates and returns a shallow copy of the object. | HSL | ||
equals(o:*):Boolean
Compares the specified object with this object for equality. | HSL | ||
set(... args):void
Sets the hsl components (h,s,l)
| HSL | ||
toObject():Object
Converts an object to an equivalent Object value. | HSL | ||
toSource(indent:int = 0):String
Returns the source code string representation of the object. | HSL | ||
toString():String
Returns a String representation of the object. | HSL | ||
| h | property |
h:NumberThe hue component (between 0 and 360).
public function get h():Number public function set h(value:Number):void| l | property |
l:NumberThe lightness value component of the hsl color (between 0 and 1).
public function get l():Number public function set l(value:Number):void| s | property |
s:NumberThe saturation component (between 0 and 1).
public function get s():Number public function set s(value:Number):void| HSL | () | Constructor |
public function HSL(h:Number = 0, s:Number = 0, l:Number = 0)Creates a new HSL instance.
Parametersh:Number (default = 0) — The hue component (between 0 and 360).
| |
s:Number (default = 0) — The saturation component (between 0 and 1).
| |
l:Number (default = 0) — The lightness value component of the hsl color (between 0 and 1).
|
| clone | () | method |
public function clone():*Creates and returns a shallow copy of the object.
Returns* — A new object that is a shallow copy of this instance.
|
| equals | () | method |
public function equals(o:*):BooleanCompares the specified object with this object for equality.
Parameters
o:* |
Boolean — true if the the specified object is equal with this object.
|
| set | () | method |
public function set(... args):voidSets the hsl components (h,s,l)
Parameters
... args |
| toObject | () | method |
public function toObject():ObjectConverts an object to an equivalent Object value.
ReturnsObject — the Object representation of the instance.
|
| toSource | () | method |
public function toSource(indent:int = 0):StringReturns the source code string representation of the object.
Parameters
indent:int (default = 0) |
String — the source code string representation of the object.
|
| toString | () | method |
public function toString():StringReturns a String representation of the object.
ReturnsString — a String representation of the object.
|