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
Double

The red component of the color.

g
Double

The green component of the color.

b
Double

The blue component of the color.

a
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.

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
Int32

The red component of the color.

g
Int32

The green component of the color.

b
Int32

The blue component of the color.

a
Int32

The alpha component of the color.

Returns

A new RGBA color.

Remarks

Component values are clamped to [0,255].

Applies to