tests/Colourful.Tests/Spaces/Jzazbz/RGBAndJzazbzConversionTest.cs
/// <summary>
/// Tests conversion
/// from <see cref="RGBColor" /> (<see cref="RGBWorkingSpaces.sRGB">sRGB working space</see>)
/// to <see cref="JzazbzColor" />.
/// </summary>
Tests conversion
from  (sRGB working space.
Tests conversion from ( sRGB working space .
[Theory]
        [InlineData(215 / 255d, 183 / 255d, 251 / 255d, 0.8082452316139784, 0.03128405391849587, -0.07214170275247)]
        [InlineData(0, 0, 0, -8.077935669463161e-26, -2.5849394142282115e-26, 0)]
        [InlineData(1, 1, 1, 0.9886011804209902, -0.00024120640221192424, -0.00015051014313560707)]
        [InlineData(210 / 255d, 88 / 255d, 6 / 255d, 0.5724569969567214, 0.11371956333703165, 0.20847893937029804)]
        [InlineData(255 / 255d, 254 / 255d, 206 / 255d, 0.9655170100316091, -0.007751523182026876, 0.05434705677934293)]
        public void Convert_sRGB_to_Jzazbz(double r,
            double g,
            double b,
            double jz,
            double az,
            double bz)
        {
            var input = new RGBColor(r, g, b);
            var converter = new ConverterBuilder()
                .FromRGB()
                .ToJzazbz()
                .Build();
            var output = converter.Convert(input);
            Assert.Equal(jz, output.Jz, DoubleComparer);
            Assert.Equal(az, output.az, DoubleComparer);
            Assert.Equal(bz, output.bz, DoubleComparer);
        }
[ Theory ] [ InlineData ( 215 / 255d , 183 / 255d , 251 / 255d , 0.8082452316139784 , 0.03128405391849587 , - 0.07214170275247 ) ] [ InlineData ( 0 , 0 , 0 , - 8.077935669463161e-26 , - 2.5849394142282115e-26 , 0 ) ] [ InlineData ( 1 , 1 , 1 , 0.9886011804209902 , - 0.00024120640221192424 , - 0.00015051014313560707 ) ] [ InlineData ( 210 / 255d , 88 / 255d , 6 / 255d , 0.5724569969567214 , 0.11371956333703165 , 0.20847893937029804 ) ] [ InlineData ( 255 / 255d , 254 / 255d , 206 / 255d , 0.9655170100316091 , - 0.007751523182026876 , 0.05434705677934293 ) ] public void Convert_sRGB_to_Jzazbz ( double r , double g , double b , double jz , double az , double bz ) { var input = new RGBColor ( r , g , b ) ; var converter = new ConverterBuilder ( ) . FromRGB ( ) . ToJzazbz ( ) . Build ( ) ; var output = converter . Convert ( input ) ; Assert . Equal ( jz , output . Jz , DoubleComparer ) ; Assert . Equal ( az , output . az , DoubleComparer ) ; Assert . Equal ( bz , output . bz , DoubleComparer ) ; }
Tests conversion
from  (sRGB working space.
Tests conversion from ( sRGB working space .
// arrange // act // assert
r
double
g
double
b
double
jz
double
az
double
bz
double