private static function decode_background($background) { $parts = explode(',', $background); $parts[0] = Image::decode_color($parts[0]); if (count($parts) == 1) { return array($parts[0], null, 0); } $parts[1] = Image::decode_color($parts[1]); return $parts; }