private static CS.ColorRGB rtxyz(CS.ColorRGB c0) { var c1 = new CS.ColorXYZ(c0, SRGB_D65_2); var c2 = new CS.ColorRGB(c1, SRGB_D65_2); return(c2); }
public void SpotCheckRGBToXYZ() { var xyz = new CS.ColorXYZ(new CS.ColorRGB(1, 0, 0), SRGB_D65_2); Assert.AreEqual(41.240, xyz.X, 0.01); Assert.AreEqual(21.260, xyz.Y, 0.01); Assert.AreEqual(1.930, xyz.Z, 0.01); }
private static CS.ColorRGB rtlab(CS.ColorRGB c0) { var c1 = new CS.ColorXYZ(c0, SRGB_D65_2); var c2 = new CS.ColorLAB(c1, SRGB_D65_2); var c3 = new CS.ColorXYZ(c2, SRGB_D65_2); var c4 = new CS.ColorRGB(c3, SRGB_D65_2); return(c4); }
public void SpotCheckXYZToRGB3() { var xyz = new CS.ColorXYZ(95.050, 100.00, 108.900); var rgb = new CS.ColorRGB(xyz, SRGB_D65_2); Assert.AreEqual(1, rgb.R, 0.01); Assert.AreEqual(1, rgb.G, 0.01); Assert.AreEqual(0.99992, rgb.B, 0.01); }
public void SpotCheckXYZToRGB2() { var xyz = new CS.ColorXYZ(87.54, 92.879, 107.903); var rgb = new CS.ColorRGB(xyz, SRGB_D65_2); Assert.AreEqual(0.9411, rgb.R, 0.01); Assert.AreEqual(0.97257, rgb.G, 0.01); Assert.AreEqual(0.99992, rgb.B, 0.01); }
public void SpotCheckXYZToRGB() { var xyz = new CS.ColorXYZ(41.240, 21.260, 1.930); var rgb = new CS.ColorRGB(xyz, SRGB_D65_2); Assert.AreEqual(1, rgb.R, 0.01); Assert.AreEqual(0, rgb.G, 0.01); Assert.AreEqual(0, rgb.G, 0.01); }
public void SpotCheckRGBToLAB() { var xyz = new CS.ColorXYZ(new CS.ColorRGB(1, 0, 0), SRGB_D65_2); var lab = new CS.ColorLAB(xyz, SRGB_D65_2); Assert.AreEqual(53.233, lab.L, 0.1); Assert.AreEqual(80.10, lab.A, 0.1); Assert.AreEqual(67.22, lab.B, 0.1); }
public void SpotCheckLABToXYZ() { var lab = new CS.ColorLAB(53.233, 80.10, 67.22); var xyz = new CS.ColorXYZ(lab, SRGB_D65_2); Assert.AreEqual(41.240, xyz.X, 0.01); Assert.AreEqual(21.260, xyz.Y, 0.01); Assert.AreEqual(1.930, xyz.Z, 0.01); }
public void SpotCheckXYZToLAB() { var xyz = new CS.ColorXYZ(41.240, 21.260, 1.930); var lab = new CS.ColorLAB(xyz, SRGB_D65_2); Assert.AreEqual(53.233, lab.L, 0.01); Assert.AreEqual(67.22, lab.B, 0.01); Assert.AreEqual(80.10, lab.A, 0.01); }
public void SpotCheckLABToRGB() { var lab = new CS.ColorLAB(53.233, 80.10, 67.22); var xyz = new CS.ColorXYZ(lab, SRGB_D65_2); var rgb = new CS.ColorRGB(xyz, SRGB_D65_2); Assert.AreEqual(1, rgb.R, 0.01); Assert.AreEqual(0, rgb.G, 0.01); Assert.AreEqual(0, rgb.G, 0.01); }