|
|
|
|
Implements interface: HammerKit_ObjectInterface
This class describes and contains the functionality for adding, removing and managing colors and their attributes. A color is identified by its database id, which is an integer number, or a six character long hexadecimal color value with a leading #-sign.
string description
Description:
The user specified description for the color.
Settable: yes
integer[3] hsl
Description: The hue, saturation and lightness values of the color in an array
where the first index 0 contains the value for hue, index 1 contains
the value for saturation and index 2 contains the value for lightness.
Settable: no
unique integer id
Description: The database id number of the color.
Settable: no
string name
Description:
The user specified name of the color.
Settable: yes
integer palette_id
Description: The id of the color palette this color belongs to.
Settable: yes
integer[3] rgb
Description: The red, green and blue values of the color in an array where the first index 0 contains the value for red, index 1 contains the value for green and index 2 contains the value for blue.
Settable: no
string value
Description:
The value of the color as a six character long hexadecimal color value with a leading #-sign.
Settable: yes
static HammerKit_Color add(array attributes)
Description: see the description of the HammerKit_ObjectInterface interface
string getAttribute(string attribute [, boolean formatted [, array format_options]])
Description: see the description of the HammerKit_ObjectInterface interface
static array getAttributeList([string property])
Description: see the description of the HammerKit_ObjectInterface interface
integer[3] getHsl(void)
Description: get the hue, saturation and lightness of the color with hue values ranging from 0 to 359 and saturation and lightness values ranging from 0 to 100
Returns: an array where index 0 is the hue, index 1 is the saturation and index 2 is the lightness of the color value
static HammerKit_Color getInstance(integer id)
Description: see the description of the HammerKit_ObjectInterface interface
static HammerKit_ObjectList:HammerKit_Color getList([array where])
Description: see the description of the HammerKit_ObjectInterface interface
integer[3] getRgb(void)
Description: get the red, green and blue components of the color with values ranging from 0 to 255
Returns: an array where index 0 is the red, index 1 is the green and index 2 is the blue component of the color value
boolean remove(void)
Description: see the description of the HammerKit_ObjectInterface interface
boolean setAttribute(string name, mixed value)
Description: see the description of the HammerKit_ObjectInterface interface
boolean setAttributes(array attributes)
Description: see the description of the HammerKit_ObjectInterface interface
|
� HammerKit Oy 2008 |
UPDATED: 26.01.2009 15:40 |
|