             }
         }
         
-        var result = _convertLinearFromConnection(color)
+        var result = _convertLinearToConnection(_convertToLinear(color))
         
         switch b2a {
         case .monochrome, .matrix, .LUT0:

            }
        }
        
        for i in 0..<Model.numberOfComponents {
            result.setNormalizedComponent(i, result[i])
        }
        
        return self.connection.convertToXYZ(result) * chromaticAdaptationMatrix.inverse
    }
    
    @_versioned
    @_inlineable
    func convertLinearFromXYZ(_ color: XYZColorModel) -> Model {
        
        var color = self.connection.convertFromXYZ(color * chromaticAdaptationMatrix)
        
        for i in 0..<Model.numberOfComponents {
            color[i] = color.normalizedComponent(i)

            }
        }
        
        result.setNormalizedComponent(0, result[0])
        result.setNormalizedComponent(1, result[1])
        result.setNormalizedComponent(2, result[2])
        
        return self.connection.convertToXYZ(result) * chromaticAdaptationMatrix.inverse
    }
    
    @_versioned
    @_inlineable
    func convertFromXYZ(_ color: XYZColorModel) -> Model {
        
        var color = self.connection.convertFromXYZ(color * chromaticAdaptationMatrix)
        
        color[0] = color.normalizedComponent(0)
        color[1] = color.normalizedComponent(1)
        color[2] = color.normalizedComponent(2)
        
        switch b2a {
        case .monochrome, .matrix, .LUT0:
            if color is XYZColorModel {
                color[0] = color[0] * 2
                color[2] = color[2] * 2
            }
        case .LUT1, .LUT2, .LUT3, .LUT4:
            if color is XYZColorModel {
                color[1] = color[1] * 0.5
            }
        }
        
        var result = _convertFromLinear(_convertLinearFromConnection(color))
        
        switch b2a {
        case .monochrome, .matrix, .LUT0:
            if result is XYZColorModel {
                result[0] = result[0] * 0.5
                result[2] = result[2] * 0.5
            }
        case .LUT1, .LUT2, .LUT3, .LUT4:
            if result is XYZColorModel {
                result[1] = result[1] * 2
            }
        }
        
        for i in 0..<Model.numberOfComponents {
            result.setNormalizedComponent(i, result[i])
        }
        
        return result
    }
}

