Alpha-blending refers to allowing a background color to show through a particular color. You use the static Color.FromArgb method to create a alpha-blended color. For example,
SolidBrush redBrushSolid = new SolidBrush(Color.FromArgb(255, 255, 0, 0));
SolidBrush redBrushMedium = new SolidBrush(Color.FromArgb(120, 255, 0, 0));
SolidBrush redBrushLight = new SolidBrush(Color.FromArgb(60, 255, 0, 0));
creates three red brushes. The first argument is the alpha-blending value, from 0 to 255. The last three arguments are the RGB values, denoting in this case, red. In the picture below, all three circles use the color red, but each circle has a different alpha blending setting, allowing the white background to show through.
Share with