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.
This topic has not yet been rated - Rate this topic

Color.FromArgb method

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

Syntax


public static Color FromArgb(
  byte a, 
  byte r, 
  byte g, 
  byte b
)

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.

Return value

Type: Color

A Color structure with the specified values.

Remarks

The FromArgb method requires you to specify 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.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Namespace

Windows.UI

Assembly

System.Runtime.WindowsRuntime.dll

See also

Color

 

 

Build date: 2/25/2013

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.