How do I get the color from a hexadecimal color code using .NET?

前端 未结 16 796
不思量自难忘°
不思量自难忘° 2020-11-22 06:45

How can I get a color from a hexadecimal color code (e.g. #FFDFD991)?

I am reading a file and am getting a hexadecimal color code. I need to create the

16条回答
  •  鱼传尺愫
    2020-11-22 07:11

    You could use the following code:

    Color color = System.Drawing.ColorTranslator.FromHtml("#FFDFD991");
    

提交回复
热议问题