 public struct XYZColorModel : ColorModelProtocol {
     
     /// The Y luminance component.
-    public var X: Double
+    public var x: Double
     /// The Cb chroma component.
-    public var Y: Double
+    public var y: Double
     /// The Cr chroma component.
-    public var Z: Double
-    
-    public var x: Double {
-        get {
-            return X / (X + Y + Z)
-        }
-        set {
-            self = XYZColorModel(x: newValue, y: y, luminance: luminance)
-        }
-    }
-    public var y: Double {
-        get {
-            return Y / (X + Y + Z)
-        }
-        set {
-            self = XYZColorModel(x: x, y: newValue, luminance: luminance)
-        }
-    }
-    
-    public var luminance: Double {
-        get {
-            return Y
-        }
-        set {
-            self.Y = newValue
-        }
-    }
+    public var z: Double
     
     public init(x: Double, y: Double, z: Double) {
-        self.X = x
-        self.Y = y
-        self.Z = z
-    }
-    
-    public init(x: Double, y: Double, luminance: Double) {
-        let _y = 1 / y
-        self.X = x * _y * luminance
-        self.Y = luminance
-        self.Z = (1 - x - y) * _y * luminance
-    }
-}
-
+        self.x = x
+        self.y = y
+        self.z = z
+    }
+    
+    public init(_ Yxy: YxyColorModel) {
+        let _y = 1 / Yxy.y
+        self.x = Yxy.x * _y * Yxy.luminance
+        self.y = Yxy.luminance
+        self.z = (1 - Yxy.x - Yxy.y) * _y * Yxy.luminance
+    }
+}
 extension XYZColorModel : CustomStringConvertible {
     
     public var description: String {
-        return "XYZColorModel(x: \(X), y: \(Y), z: \(Z))"
+        return "XYZColorModel(x: \(x), y: \(y), z: \(z))"
+    }
+}
+
+public struct YxyColorModel : ColorModelProtocol {
+    
+    public var luminance: Double
+    public var x: Double
+    public var y: Double
+    
+    public init(luminance: Double, x: Double, y: Double) {
+        self.luminance = luminance
+        self.x = x
+        self.y = y
+    }
+    
+    public init(_ xyz: XYZColorModel) {
+        let _s = 1 / (xyz.x + xyz.y + xyz.z)
+        self.luminance = xyz.y
+        self.x = _s * xyz.x
+        self.y = _s * xyz.y
+    }
+}
+
+extension YxyColorModel : CustomStringConvertible {
+    
+    public var description: String {
+        return "YxyColorModel(luminance: \(luminance), x: \(x), y: \(y))"
     }
 }
 
 public func * <T: MatrixProtocol>(lhs: XYZColorModel, rhs: T) -> XYZColorModel {
-    return XYZColorModel(x: lhs.X * rhs.a + lhs.Y * rhs.b + lhs.Z * rhs.c + rhs.d, y: lhs.X * rhs.e + lhs.Y * rhs.f + lhs.Z * rhs.g + rhs.h, z: lhs.X * rhs.i + lhs.Y * rhs.j + lhs.Z * rhs.k + rhs.l)
+    return XYZColorModel(x: lhs.x * rhs.a + lhs.y * rhs.b + lhs.z * rhs.c + rhs.d, y: lhs.x * rhs.e + lhs.y * rhs.f + lhs.z * rhs.g + rhs.h, z: lhs.x * rhs.i + lhs.y * rhs.j + lhs.z * rhs.k + rhs.l)
 }
 
 public func *= <T: MatrixProtocol>(lhs: inout XYZColorModel, rhs: T) {

    }
    public func convertLinearFromXYZ(_ color: XYZColorModel) -> Model {
        let transferMatrix = self.transferMatrix
        let _color = Vector(x: color.X, y: color.Y, z: color.Z) * transferMatrix.inverse
        return Model(red: _color.x, green: _color.y, blue: _color.z)
    }
}

        let matrix = algorithm.matrix
        let _s = self.white * matrix
        let _d = other.white * matrix
        return color * matrix * Matrix.Scale(x: _d.x / _s.x, y: _d.y / _s.y, z: _d.z / _s.z) * matrix.inverse
    }
}

