Exemplo n.º 1
0
        public void Colors_ShouldRoundtripFromRgbToCielab()
        {
            // Arrange
            var color = Color.Red;

            // Act
            var colorRgb     = new RgbVector(color);
            var colorXyz     = ColorXyz.FromRgb(colorRgb);
            var colorCielab  = ColorCielab.FromRgb(colorRgb);
            var colorXyzBack = colorCielab.AsColorXyz();
            var colorRgbBack = colorXyzBack.AsColorRgb();

            // Assert
            Assert.Fail();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Gets the color value of a pixel in CIELAB space
 /// </summary>
 /// <param name="bitmap"></param>
 /// <param name="x"></param>
 /// <param name="y"></param>
 /// <returns></returns>
 public static ColorCielab GetCielabColor(this Bitmap bitmap, int x, int y)
 {
     return(ColorCielab.FromRgb(new RgbVector(bitmap.GetPixel(x, y))));
 }