 extension Color {
     
     public func convert<ColorSpace : ColorSpaceProtocol>(to colorSpace: ColorSpace, algorithm: CIEXYZColorSpace.ChromaticAdaptationAlgorithm = .bradford) -> Color {
-        return Color(base: self.base.convert(to: colorSpace, algorithm: algorithm))
+        return Color(alpha: self.alpha, base: self.base.convert(to: colorSpace, algorithm: algorithm))
     }
 }

    var colorSpace: ColorSpace
    
    var _color: ColorSpace.Model
    var alpha: Double
    var color: ColorModelProtocol {
        return _color
    }
    
    init(colorSpace: ColorSpace, color: ColorSpace.Model, alpha: Double) {
        self.colorSpace = colorSpace
        self._color = color
        self.alpha = alpha
    }
}

extension ColorBase {
    
    func convert<C : ColorSpaceProtocol>(to colorSpace: C, algorithm: CIEXYZColorSpace.ChromaticAdaptationAlgorithm) -> ColorBase<C> {
        return ColorBase<C>(colorSpace: colorSpace, color: self.colorSpace.convert(_color, to: colorSpace, algorithm: algorithm), alpha: alpha)
    }
}

public struct Color {
    
    fileprivate var base: ColorBaseProtocol
    
    fileprivate init(base: ColorBaseProtocol) {
        self.base = base
    }
    
    public init<ColorSpace : ColorSpaceProtocol>(colorSpace: ColorSpace, color: ColorSpace.Model, alpha: Double = 1) {
        self.base = ColorBase(colorSpace: colorSpace, color: color, alpha: alpha)
    }
}

extension Color {
    
    public var alpha: Double {
        get {
            return self.base.alpha
        }
        set {
            self.base.alpha = newValue
        }
    }
    
    public var color: ColorModelProtocol {
        return self.base.color


private protocol ColorBaseProtocol {
    
    var color: ColorModelProtocol { get }
    
    func convert<ColorSpace : ColorSpaceProtocol>(to colorSpace: ColorSpace, algorithm: CIEXYZColorSpace.ChromaticAdaptationAlgorithm) -> ColorBase<ColorSpace>
