Blog.Mobile.Helpers.Color.FromHex C# (CSharp) Méthode

FromHex() public static méthode

public static FromHex ( int hex ) : Color
hex int
Résultat Color
        public static Color FromHex(int hex)
        {
            Func<int, int> at = offset => (hex >> offset) & 0xFF;
            return new Color
            {
                R = at(16) / 255.0,
                G = at(8) / 255.0,
                B = at(0) / 255.0
            };
        }