Class Index | File Index

Classes


Class pv.Color.Hsl


Extends pv.Color.
Represents a color in HSL space.
Defined in: Color.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
pv.Color.Hsl(h, s, l, a)
Constructs a new HSL color with the specified values.
Field Summary
Field Attributes Field Name and Description
 
a
The opacity, a float in [0, 1].
 
h
The hue, an integer in [0, 360].
 
l
The lightness, a float in [0, 1].
 
s
The saturation, a float in [0, 1].
Fields borrowed from class pv.Color:
color, opacity
Method Summary
Method Attributes Method Name and Description
 
alpha(a)
Constructs a new HSL color with the same hue, saturation and lightness as this color, and the specified alpha.
 
hue(h)
Constructs a new HSL color with the same saturation, lightness and alpha as this color, and the specified hue.
 
Constructs a new HSL color with the same hue, saturation and alpha as this color, and the specified lightness.
 
rgb()
Returns the RGB color equivalent to this HSL color.
 
Constructs a new HSL color with the same hue, lightness and alpha as this color, and the specified saturation.
Methods borrowed from class pv.Color:
brighter, darker
Class Detail
pv.Color.Hsl(h, s, l, a)
Constructs a new HSL color with the specified values.
Parameters:
{number} h
the hue, an integer in [0, 360].
{number} s
the saturation, a float in [0, 1].
{number} l
the lightness, a float in [0, 1].
{number} a
the opacity, a float in [0, 1].
Field Detail
{number} a
The opacity, a float in [0, 1].

{number} h
The hue, an integer in [0, 360].

{number} l
The lightness, a float in [0, 1].

{number} s
The saturation, a float in [0, 1].
Method Detail
alpha(a)
Constructs a new HSL color with the same hue, saturation and lightness as this color, and the specified alpha.
Parameters:
{number} a
the opacity, a float in [0, 1].

hue(h)
Constructs a new HSL color with the same saturation, lightness and alpha as this color, and the specified hue.
Parameters:
{number} h
the hue, an integer in [0, 360].

lightness(l)
Constructs a new HSL color with the same hue, saturation and alpha as this color, and the specified lightness.
Parameters:
{number} l
the lightness, a float in [0, 1].

{pv.Color.Rgb} rgb()
Returns the RGB color equivalent to this HSL color.
Returns:
{pv.Color.Rgb} an RGB color.

saturation(s)
Constructs a new HSL color with the same hue, lightness and alpha as this color, and the specified saturation.
Parameters:
{number} s
the saturation, a float in [0, 1].

Documentation generated by JsDoc Toolkit 2.3.2 on Fri May 28 2010 10:13:27 GMT-0700 (PDT)