System.Drawing.Color enumeration

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,
not sure if this is the correct forum for this, but anyway - how do I alter
the alpha channel of one of the System Colors? For example, if I want
System.Drawing.Color.Blue, but with an alpha value of 100, how can this be
done? Thanks in advance!
 
Lionel said:
Hello all,
not sure if this is the correct forum for this, but anyway - how do I alter
the alpha channel of one of the System Colors? For example, if I want
System.Drawing.Color.Blue, but with an alpha value of 100, how can this be
done? Thanks in advance!

There's a method in Color for just that kind of purpose:
Color.FromArgb(int, Color)

So in your case, you'd use:

Color myColor = Color.FromArgb(100, Color.Blue);
 
Back
Top