共用方式為


Color.FromRgba 方法

定義

多載

FromRgba(Double, Double, Double, Double)

傳回新的 RGBA 色彩執行個體。

FromRgba(Int32, Int32, Int32, Int32)

傳回新的 RGBA 色彩執行個體。

FromRgba(Double, Double, Double, Double)

傳回新的 RGBA 色彩執行個體。

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

參數

r
System.Double

色彩的紅色元件。

g
System.Double

色彩的綠色元件。

b
System.Double

色彩的藍色元件。

a
System.Double

色彩的 Alpha 元件。

傳回

新的 RGBA 色彩。

備註

元件值會限制為 [0,1]。 方法 FromRgba(Double, Double, Double, Double) 相當於 new Color (r, g, b, a),而且適用於 API 一致性。

適用於

FromRgba(Int32, Int32, Int32, Int32)

傳回新的 RGBA 色彩執行個體。

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

參數

r
System.Int32

色彩的紅色元件。

g
System.Int32

色彩的綠色元件。

b
System.Int32

色彩的藍色元件。

a
System.Int32

色彩的 Alpha 元件。

傳回

新的 RGBA 色彩。

備註

元件值會限制為 [0,255]。

適用於