Пример #1
0
        /// <inheritdoc/>
        public override Color ToColor()
        {
            var x      = this.a / 17.5 * (this.L / 10);
            var y      = Math.Pow(this.L / 10, 2);
            var z      = this.b / 7 * this.L / 10;
            var cieXyz = new CieXyz {
                X = (x + y) / 1.02, Y = y, Z = -(z - y) / .847
            };

            return(cieXyz.ToColor());
        }
Пример #2
0
        /// <inheritdoc/>
        public override Color ToColor()
        {
            var y = (this.L + 16) / 116;
            var x = this.a / 500 + y;
            var z = y - this.b / 200;

            y = Math.Pow(y, 3) > CieXyz.T0 ? Math.Pow(y, 3) : (y - CieLab.B) / CieLab.A;
            x = Math.Pow(x, 3) > CieXyz.T0 ? Math.Pow(x, 3) : (x - CieLab.B) / CieLab.A;
            z = Math.Pow(z, 3) > CieXyz.T0 ? Math.Pow(z, 3) : (z - CieLab.B) / CieLab.A;
            var cieXyz = new CieXyz {
                X = CieXyz.WhiteReference.X * x, Y = CieXyz.WhiteReference.Y * y, Z = CieXyz.WhiteReference.Z * z
            };

            return(cieXyz.ToColor());
        }