diff options
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 ); } |