Color.FromRgba 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
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]。