Set System.Drawing.Color values

后端 未结 6 1873
耶瑟儿~
耶瑟儿~ 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:41

    You could do:

    Color c = Color.FromArgb(red, green, blue); //red, green and blue are integer variables containing red, green and blue components
    

提交回复
热议问题