public void Convert_Luv_to_XYZ(double l, double u, double v, double x, double y, double z)
        {
            // arrange
            var input = new LuvColor(l, u, v, Illuminants.D65);
            var converter = new ColourfulConverter { WhitePoint = Illuminants.D65, TargetLuvWhitePoint = Illuminants.D65 };

            // act
            XYZColor output = converter.ToXYZ(input);

            // assert
            Assert.That(output.X, Is.EqualTo(x).Using(DoubleComparerXYZPrecision));
            Assert.That(output.Y, Is.EqualTo(y).Using(DoubleComparerXYZPrecision));
            Assert.That(output.Z, Is.EqualTo(z).Using(DoubleComparerXYZPrecision));
        }
        public void Convert_xyY_to_XYZ(double xyzX, double xyzY, double xyzZ, double x, double y, double Y)
        {
            // arrange
            var input = new xyYColor(x, y, Y);
            var converter = new ColourfulConverter();

            // act
            XYZColor output = converter.ToXYZ(input);

            // assert
            Assert.That(output.X, Is.EqualTo(xyzX).Using(DoubleComparer));
            Assert.That(output.Y, Is.EqualTo(xyzY).Using(DoubleComparer));
            Assert.That(output.Z, Is.EqualTo(xyzZ).Using(DoubleComparer));
        }
        public void Convert_HunterLab_to_XYZ_D65(double l, double a, double b, double x, double y, double z)
        {
            // arrange
            var input = new HunterLabColor(l, a, b);
            var converter = new ColourfulConverter { WhitePoint = Illuminants.D65 };

            // act
            XYZColor output = converter.ToXYZ(input);

            // assert
            Assert.That(output.X, Is.EqualTo(x).Using(DoubleComparerXYZPrecision));
            Assert.That(output.Y, Is.EqualTo(y).Using(DoubleComparerXYZPrecision));
            Assert.That(output.Z, Is.EqualTo(z).Using(DoubleComparerXYZPrecision));
        }
        public void Convert_sRGB_to_XYZ_D50(double r, double g, double b, double x, double y, double z)
        {
            // arrange
            var input = new RGBColor(r, g, b);
            var converter = new ColourfulConverter { WhitePoint = Illuminants.D50 };

            // act
            XYZColor output = converter.ToXYZ(input);

            // assert
            Assert.That(output.X, Is.EqualTo(x).Using(DoubleComparer));
            Assert.That(output.Y, Is.EqualTo(y).Using(DoubleComparer));
            Assert.That(output.Z, Is.EqualTo(z).Using(DoubleComparer));
        }
        public void Convert_XYZ_as_vector_to_XYZ(double x, double y, double z)
        {
            // arrange
            IColorVector input = new XYZColor(x, y, z);

            var converter = new ColourfulConverter();

            // act
            XYZColor output = converter.ToXYZ(input);

            // assert
            Assert.That(output.X, Is.EqualTo(x).Using(DoubleComparer));
            Assert.That(output.Y, Is.EqualTo(y).Using(DoubleComparer));
            Assert.That(output.Z, Is.EqualTo(z).Using(DoubleComparer));
        }