Color.FromArgb Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Creates a new Color structure by using the specified sRGB alpha channel and color channel values.
Assembly: System.Windows (in System.Windows.dll)
'Declaration Public Shared Function FromArgb ( _ a As Byte, _ r As Byte, _ g As Byte, _ b As Byte _ ) As Color
Parameters
- a
- Type: System.Byte
The alpha channel, A, of the new color. The value must be between 0 and 255.
- r
- Type: System.Byte
The red channel, R, of the new color. The value must be between 0 and 255.
- g
- Type: System.Byte
The green channel, G, of the new color. The value must be between 0 and 255.
- b
- Type: System.Byte
The blue channel, B, of the new color. The value must be between 0 and 255.
The FromArgb method requires you to specify the alpha channel; the Windows Phone implementation of Color does not support Color.FromRgb. The alpha channel of a color determines the amount of transparency of the color. An alpha value of 255 indicates that the color is completely opaque, and a value of 0 indicates that the color is completely transparent.