Set System.Drawing.Color values

后端 未结 6 1878
耶瑟儿~
耶瑟儿~ 2021-02-04 23:13

Hi how to set R G B values in System.Drawing.Color.G ?

which is like System.Drawing.Color.G=255; is not allowed because its read o

6条回答
  •  情话喂你
    2021-02-04 23:25

    You could create a color using the static FromArgb method:

    Color redColor = Color.FromArgb(255, 0, 0);
    

    You can also specify the alpha using the following overload.

提交回复
热议问题