Color.FromRgb Method

Definition

Overloads

FromRgb(Double, Double, Double)

Returns a new rgb color instance.

FromRgb(Int32, Int32, Int32)

Returns a new rgb color instance.

FromRgb(Double, Double, Double)

Returns a new rgb color instance.

public static Xamarin.Forms.Color FromRgb (double r, double g, double b);
static member FromRgb : 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.

Returns

An RGB color

Remarks

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

Applies to

FromRgb(Int32, Int32, Int32)

Returns a new rgb color instance.

public static Xamarin.Forms.Color FromRgb (int r, int g, int b);
static member FromRgb : 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.

Returns

A new RGB color.

Remarks

Component values are clamped to [0,255].

Applies to