다음을 통해 공유


Color.FromRgba Method

Definition

Overloads

FromRgba(Double, Double, Double, Double)

Returns a new RGBA color instance.

FromRgba(Int32, Int32, Int32, Int32)

Returns a new RGBA color instance.

FromRgba(Double, Double, Double, Double)

Returns a new RGBA color instance.

public static Xamarin.Forms.Color FromRgba (double r, double g, double b, double a);
static member FromRgba : double * double * double * double -> Xamarin.Forms.Color

Parameters

r
System.Double

The red component of the color.

g
System.Double

The green component of the color.

b
System.Double

The blue component of the color.

a
System.Double

The alpha component of the color.

Returns

A new RGBA color.

Remarks

Component values are clamped to [0,1]. The FromRgba(Double, Double, Double, Double) method is striclty equivalent to new Color (r, g, b, a), and is present for API consistency.

Applies to

FromRgba(Int32, Int32, Int32, Int32)

Returns a new RGBA color instance.

public static Xamarin.Forms.Color FromRgba (int r, int g, int b, int a);
static member FromRgba : int * int * int * int -> Xamarin.Forms.Color

Parameters

r
System.Int32

The red component of the color.

g
System.Int32

The green component of the color.

b
System.Int32

The blue component of the color.

a
System.Int32

The alpha component of the color.

Returns

A new RGBA color.

Remarks

Component values are clamped to [0,255].

Applies to