Algorithmix.Utility.IntToBgr C# (CSharp) Метод

IntToBgr() публичный статический Метод

Takes an integer, returns a BGR color
public static IntToBgr ( int color ) : Bgr
color int an integer between 0 and 0xFFFFFF inclusive
Результат Bgr
        public static Bgr IntToBgr(int color)
        {
            if (color > 0xFFFFFF)
            {
                throw new IndexOutOfRangeException("Color must be <= 0xFFFFFF");
            }
            int blue = color & (0xFF0000);
            int green = color & (0x00FF00);
            int red = color & (0x0000FF);
            return new Bgr(blue, green, red);
        }