 
 public extension ColorSpace {
     
-    static let genericGray: ColorSpace = ColorSpace()
-    
-    static let genericRGB: ColorSpace = ColorSpace()
+    static let genericRGB: ColorSpace = ColorSpace(profile: cmsCreate_sRGBProfile())
+    
+    static let genericGray: ColorSpace = ColorSpace(profile: cmsCreate_sRGBProfile()) // fixme
 }
 
 // MARK: - Supporting Types
 
 public extension ColorSpace {
+    
+    public enum ProfileInfo {
+        
+        case description
+        case manufacturer
+        case model
+        case copyright
+    }
+    
+    public enum FileAccess: String {
+        
+        case read = "r"
+        case write = "w"
+    }
     
     /// Models for color spaces.
     public enum Model {

//
//

//import cLCMS

public final class ColorSpace {
    
    public let name: String
    
    fileprivate let profile: OpaquePointer
    
    public init() {
        
        fatalError()
    }
    
    public var numberOfComponents: UInt {
        
        return 0 // _cmsChannelsOf(cmsGetColorSpace(profile))
    }
}


        case pattern
    }
}

// MARK: - Little CMS Extensions / Helpers

extension cmsInfoType {
    
    init(_ info: ColorSpace.ProfileInfo) {
        
        switch info {
        case .description:  self = cmsInfoDescription
        case .manufacturer: self = cmsInfoManufacturer
        case .model:        self = cmsInfoModel
        case .copyright:    self = cmsInfoCopyright
        }
    }
}

extension cmsCIExyY {
    
    init(CIExyz point: (Double, Double, Double)) {
        
        self.init(x: point.0, y: point.1, Y: 1)
    }
    
    init(CIEXYZ point: (Double, Double, Double)) {
        
        var XYZ = cmsCIEXYZ(X: point.0, Y: point.1, Z: point.2)
        
        cmsXYZ2xyY(&self, &XYZ)
    }
}
