Pass color name as string in SharpDX.Color
问题 i am getting a color name as string (like "Black"). have to convert that color name as SharpDX.Color for my Metro app. now trying in following ways, 1)SharpDX.Color.FromRgba(int or uint value of color) 2)SharpDX.Color.FromArgb(int or uint value of color) is it possible to do this in this way.? or any other best way to done this.?? 回答1: Using Enum Parse and System.Drawing can help, it's not great but that would work: KnownColor colorenum = (KnownColor)Enum.Parse(typeof(KnownColor),"Black");