Color Constructors

Definition

Overloads

Color(Double)

Initialize a new gray color.

Color(Double, Double, Double)

Initializes a new RGB color.

Color(Double, Double, Double, Double)

Initializes a new RGB color with an alpha channel.

Color(Double)

Initialize a new gray color.

public Color (double value);
new Xamarin.Forms.Color : double -> Xamarin.Forms.Color

Parameters

value
Double

The luminosity of the gray-scale color. Valid range: [0..1].

Remarks

This is equivalent to new Color (value, value, value). The value is clamped to [0-1]. App developers should use the FromRgb(Double, Double, Double) equivalent methods, instead.

Applies to

Color(Double, Double, Double)

Initializes a new RGB color.

public Color (double r, double g, double b);
new Xamarin.Forms.Color : double * double * double -> Xamarin.Forms.Color

Parameters

r
Double

The red component of the color. Valid range: [0..1].

g
Double

The green component of the color. Valid range: [0..1].

b
Double

The blue component of the color. Valid range: [0..1].

Remarks

This is equivalent to new Color (r, g, b, 1). Values are clamped to [0-1]. Prefer the FromRgb(Double, Double, Double) equivalent methods.

Applies to

Color(Double, Double, Double, Double)

Initializes a new RGB color with an alpha channel.

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

Parameters

r
Double

The red component of the color. Valid range: [0..1].

g
Double

The green component of the color. Valid range: [0..1].

b
Double

The blue component of the color. Valid range: [0..1].

a
Double

The alpha component of the color. Valid range: [0..1].

Remarks

Values are clamped to [0-1].

Applies to