tests/Colourful.Tests/Spaces/HunterLab/XYZAndHunterLabConversionTest.cs
/// <summary>
/// Tests conversion from <see cref="XYZColor" /> (Illuminant C) to <see cref="HunterLabColor" />.
/// </summary>
Tests conversion from  (Illuminant C) to .
Tests conversion from ( Illuminant C ) to .
[Theory]
        [InlineData(0, 0, 0, 0, 0, 0)]
        [InlineData(0.98074, 1, 1.18232, 100, 0, 0)] 
        public void Convert_XYZ_to_HunterLab(double x,
            double y,
            double z,
            double l,
            double a,
            double b)
        {
            var input = new XYZColor(in x, in y, in z);
            var converter = new ConverterBuilder()
                .FromXYZ(Illuminants.C)
                .ToHunterLab(Illuminants.C)
                .Build();
            var output = converter.Convert(in input);
            Assert.Equal(l, output.L, DoubleComparerHunterLabPrecision);
            Assert.Equal(a, output.a, DoubleComparerHunterLabPrecision);
            Assert.Equal(b, output.b, DoubleComparerHunterLabPrecision);
        }
[ Theory ] [ InlineData ( 0 , 0 , 0 , 0 , 0 , 0 ) ] [ InlineData ( 0.98074 , 1 , 1.18232 , 100 , 0 , 0 ) ] public void Convert_XYZ_to_HunterLab ( double x , double y , double z , double l , double a , double b ) { var input = new XYZColor ( in x , in y , in z ) ; var converter = new ConverterBuilder ( ) . FromXYZ ( Illuminants . C ) . ToHunterLab ( Illuminants . C ) . Build ( ) ; var output = converter . Convert ( in input ) ; Assert . Equal ( l , output . L , DoubleComparerHunterLabPrecision ) ; Assert . Equal ( a , output . a , DoubleComparerHunterLabPrecision ) ; Assert . Equal ( b , output . b , DoubleComparerHunterLabPrecision ) ; }
Tests conversion from  (Illuminant C) to .
Tests conversion from ( Illuminant C ) to .
// C white point is HunterLab 100, 0, 0 // arrange // act // assert
x
double
y
double
z
double
l
double
a
double
b
double