diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-06-06 14:33:35 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-06-06 14:33:35 +0000 |
commit | 51bbe683d53acf187ebaca6af0e8dcf8dc2db6e7 (patch) | |
tree | c210178cbb44bd302e4dc2decc447468f2852961 /src/structs | |
parent | c925b7cbd916a294e96d361585c396cd107a827e (diff) | |
download | zetacomponents-graph-51bbe683d53acf187ebaca6af0e8dcf8dc2db6e7.zip zetacomponents-graph-51bbe683d53acf187ebaca6af0e8dcf8dc2db6e7.tar.gz |
- Added outomatic colorization from pallets
Diffstat (limited to 'src/structs')
-rw-r--r-- | src/structs/color.php | 6 |
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 ); } |