From 51bbe683d53acf187ebaca6af0e8dcf8dc2db6e7 Mon Sep 17 00:00:00 2001 From: Kore Nordmann Date: Tue, 6 Jun 2006 14:33:35 +0000 Subject: - Added outomatic colorization from pallets --- src/structs/color.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/structs') 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 ); } -- cgit v1.1