Packagegraphics.colors
Classpublic class HSL
InheritanceHSL Inheritance Object
Implements ColorSpace

A system which represents color as Hue, Saturation and Lightness.

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..



Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined 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
Property Detail
hproperty
h:Number

The hue component (between 0 and 360).


Implementation
    public function get h():Number
    public function set h(value:Number):void
lproperty 
l:Number

The lightness value component of the hsl color (between 0 and 1).


Implementation
    public function get l():Number
    public function set l(value:Number):void
sproperty 
s:Number

The saturation component (between 0 and 1).


Implementation
    public function get s():Number
    public function set s(value:Number):void
Constructor Detail
HSL()Constructor
public function HSL(h:Number = 0, s:Number = 0, l:Number = 0)

Creates a new HSL instance.

Parameters
h: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).
Method Detail
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:*):Boolean

Compares the specified object with this object for equality.

Parameters

o:*

Returns
Booleantrue if the the specified object is equal with this object.
set()method 
public function set(... args):void

Sets the hsl components (h,s,l)

Parameters

... args

toObject()method 
public function toObject():Object

Converts an object to an equivalent Object value.

Returns
Object — the Object representation of the instance.
toSource()method 
public function toSource(indent:int = 0):String

Returns the source code string representation of the object.

Parameters

indent:int (default = 0)

Returns
String — the source code string representation of the object.
toString()method 
public function toString():String

Returns a String representation of the object.

Returns
String — a String representation of the object.