summaryrefslogtreecommitdiffstats
path: root/src/structs
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-06-06 14:33:35 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-06-06 14:33:35 +0000
commit51bbe683d53acf187ebaca6af0e8dcf8dc2db6e7 (patch)
treec210178cbb44bd302e4dc2decc447468f2852961 /src/structs
parentc925b7cbd916a294e96d361585c396cd107a827e (diff)
downloadzetacomponents-graph-51bbe683d53acf187ebaca6af0e8dcf8dc2db6e7.zip
zetacomponents-graph-51bbe683d53acf187ebaca6af0e8dcf8dc2db6e7.tar.gz
- Added outomatic colorization from pallets
Diffstat (limited to 'src/structs')
-rw-r--r--src/structs/color.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/structs/color.php b/src/structs/color.php
index c95ce6c..38dbbeb 100644
--- a/src/structs/color.php
+++ b/src/structs/color.php
@@ -176,7 +176,11 @@ class ezcGraphColor
*/
static public function create( $color )
{
- if ( is_string( $color ) )
+ if ( $color instanceof ezcGraphColor )
+ {
+ return $color;
+ }
+ elseif ( is_string( $color ) )
{
return ezcGraphColor::fromHex( $color );
}
OpenPOWER on IntegriCloud