Overview

Packages

  • None
  • PieChart

Classes

  • PieChart
  • PieChartColor
  • PieChartGD
  • PieChartImagick
  • Overview
  • Package
  • Class
  • Tree

Class PieChartColor

Utility class for storing colours in a library-agnostic format.

Package: PieChart
Located at PieChart.php
Methods summary
public
# __construct( array|integer|string $color = NULL )

Sets the colour using PieChartColor::setColor(), if an argument is provided.

Sets the colour using PieChartColor::setColor(), if an argument is provided.

Parameters

$color
array|integer|string
[$color]
public
# setColor( array|integer|string $color )

Sets the colour, using one of the following formats: '#FFFFFF', '#fff', 'rgb(255, 255, 255)', [$r, $g, $b] or ARGB (http://en.wikipedia.org/wiki/ARGB#ARGB).

Sets the colour, using one of the following formats: '#FFFFFF', '#fff', 'rgb(255, 255, 255)', [$r, $g, $b] or ARGB (http://en.wikipedia.org/wiki/ARGB#ARGB).

Parameters

$color
array|integer|string
$color
public integer
# toInt( )

Returns the colour as an integer, in the ARGB format (http://en.wikipedia.org/wiki/ARGB#ARGB).

Returns the colour as an integer, in the ARGB format (http://en.wikipedia.org/wiki/ARGB#ARGB).

Returns

integer
public string
# toRGB( )

Returns the colour in the RGB string format, e.g. 'rgb(0,0,0)'.

Returns the colour in the RGB string format, e.g. 'rgb(0,0,0)'.

Returns

string
public string
# toHex( )

Returns the color in the CSS hexadecimal format, e.g. '#000000'.

Returns the color in the CSS hexadecimal format, e.g. '#000000'.

Returns

string
Properties summary
public mixed $r
#
public mixed $g
#
public mixed $b
#
PieChart API documentation generated by ApiGen 2.8.0