     }
 }
 
-public class CalibratedRGBColorSpace : GammaColorSpaceProtocol {
+public class CalibratedRGBColorSpace : ToneResponseColorSpaceProtocol {
     
     public typealias Model = RGBColorModel
     

                return RGBColorModel(red: exteneded(color.red) { pow($0, 1 / 2.19921875) }, green: exteneded(color.green) { pow($0, 1 / 2.19921875) }, blue: exteneded(color.blue) { pow($0, 1 / 2.19921875) })
            }
        }
        return adobeRGB()
    }
    
    public static var linearAdobeRGB: CalibratedRGBColorSpace {
        
        return _adobeRGB()
    }
    
}

extension CalibratedRGBColorSpace {
    
    private class _sRGB: CalibratedRGBColorSpace {
        
        init() {
            super.init(white: XYZColorModel(luminance: 1, x: 0.3127, y: 0.3290), black: XYZColorModel(luminance: 0, x: 0.3127, y: 0.3290), red: Point(x: 0.6400, y: 0.3300), green: Point(x: 0.3000, y: 0.6000), blue: Point(x: 0.1500, y: 0.0600))
        }
    }
    
    public static var sRGB: CalibratedRGBColorSpace {
        
        class sRGB: _sRGB {
            
            override func convertToLinear(_ color: RGBColorModel) -> RGBColorModel {
                

    }
}

extension ToneResponseColorSpaceProtocol {
    
    @_versioned
    @_inlineable
    func exteneded(_ x: Double, _ gamma: (Double) -> Double) -> Double {
        return x.sign == .plus ? gamma(x) : -gamma(-x)
    }
}

@_fixed_layout
public struct LinearToneColorSpace<ColorSpace: ToneResponseColorSpaceProtocol> : ColorSpaceProtocol {
    
    @_versioned
    let base: ColorSpace
    
    @_versioned
    @_inlineable
    init(_ base: ColorSpace) {
        self.base = base
    }
    
    @_inlineable
    public var cieXYZ: CIEXYZColorSpace {
        return base.cieXYZ
    }
    
    @_inlineable
    public func convertToXYZ(_ color: ColorSpace.Model) -> XYZColorModel {
        return base.convertLinearToXYZ(color)
    }
    
    @_inlineable
    public func convertFromXYZ(_ color: XYZColorModel) -> ColorSpace.Model {
        return base.convertLinearFromXYZ(color)
    }
}

extension ToneResponseColorSpaceProtocol {
    
    @_inlineable
    public var linearTone: LinearToneColorSpace<Self> {
        return LinearToneColorSpace(self)
    }
}

