Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Color::FromArgb Method (Byte, Byte, Byte, Byte)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Creates a new Color structure by using the specified sRGB alpha channel and color channel values.

Namespace:   System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)

public:
static Color FromArgb(
	unsigned char a,
	unsigned char r,
	unsigned char g,
	unsigned char b
)

Parameters

a
Type: System::Byte

The alpha channel, A, of the new color.

r
Type: System::Byte

The red channel, R, of the new color.

g
Type: System::Byte

The green channel, G, of the new color.

b
Type: System::Byte

The blue channel, B, of the new color.

Return Value

Type: System.Windows.Media::Color

A Color structure with the specified values.

The FromArgb method allows you to specify the alpha channel; the FromRgb method uses a default value of 255 for the alpha channel.

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.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show:
© 2017 Microsoft