Class Color

Description

Describes image color.

Located in /gd2imaging.php (line 39)


	
			
Class Constant Summary
 BLUE = 4
 GREEN = 2
 RED = 1
Variable Summary
mixed $rgb
Method Summary
Color __construct ( $rgbOrRedValue, [ $greenValue = null], [ $blueValue = null])
int getBlue ()
int getGreen ()
int getHue ()
int getLuminance ([int $mode = 3])
int getRed ( $rgb)
Variables
mixed $rgb (line 45)
  • access: public
Methods
Constructor __construct (line 47)
  • access: public
Color __construct ( $rgbOrRedValue, [ $greenValue = null], [ $blueValue = null])
  • $rgbOrRedValue
  • $greenValue
  • $blueValue
getBlue (line 82)

Calculates a value of a blue component of the RGB value.

Note: should not be used for performance reasons (reason PHP < 5.4 functions overhead).

  • access: public
int getBlue ()
getGreen (line 72)

Calculates a value of a green component of the RGB value.

Note: should not be used for performance reasons (reason PHP < 5.4 functions overhead).

  • access: public
int getGreen ()
getHue (line 126)

Returns color hue.

  • access: public
int getHue ()
getLuminance (line 92)

Returns color luminance.

  • access: public
int getLuminance ([int $mode = 3])
  • int $mode: Luminance mode: 0 = fastest, 1 = Digital CCIR601, 2 = Digital ITU-R, 3 = HSP (best quality, default)
getRed (line 62)

Calculates a value of a red component of the RGB value.

Note: should not be used for performance reasons (reason PHP < 5.4 functions overhead).

  • access: public
int getRed ( $rgb)
  • $rgb
Class Constants
BLUE = 4 (line 43)
GREEN = 2 (line 42)
RED = 1 (line 41)

Documentation generated on Fri, 04 Nov 2011 17:56:15 +0100 by phpDocumentor 1.4.2