共用方式為


UIColor.FromRGBA 方法

定義

多載

FromRGBA(nfloat, nfloat, nfloat, nfloat)

使用指定的紅色、綠色和藍色元件,建立具有指定 Alpha 透明度的色彩。

FromRGBA(Byte, Byte, Byte, Byte)

使用指定的紅色、綠色和藍色元件,建立具有指定 Alpha 透明度的色彩。

FromRGBA(Int32, Int32, Int32, Int32)

使用指定的透明度,從指定的紅色、綠色和藍色元素組合中建立色彩。

FromRGBA(nfloat, nfloat, nfloat, nfloat)

使用指定的紅色、綠色和藍色元件,建立具有指定 Alpha 透明度的色彩。

[Foundation.Export("colorWithRed:green:blue:alpha:")]
public static UIKit.UIColor FromRGBA (nfloat red, nfloat green, nfloat blue, nfloat alpha);
static member FromRGBA : nfloat * nfloat * nfloat * nfloat -> UIKit.UIColor

參數

red
nfloat

紅色元件,0.0 到 1.0f。

green
nfloat

綠色元件 0.0 至 1.0f。

blue
nfloat

藍色元件值 0.0 到 1.0f。

alpha
nfloat

Alpha (透明度) 從 0.0 到 1.0f 的值。

傳回

屬性

備註

這可從背景執行緒使用。

適用於

FromRGBA(Byte, Byte, Byte, Byte)

使用指定的紅色、綠色和藍色元件,建立具有指定 Alpha 透明度的色彩。

public static UIKit.UIColor FromRGBA (byte red, byte green, byte blue, byte alpha);
static member FromRGBA : byte * byte * byte * byte -> UIKit.UIColor

參數

red
Byte

紅色元件,0 到 255。

green
Byte

綠色元件 0 到 255。

blue
Byte

藍色元件值 0 到 255。

alpha
Byte

Alpha (透明度) 值 0 到 255。

傳回

備註

這可從背景執行緒使用。

適用於

FromRGBA(Int32, Int32, Int32, Int32)

使用指定的透明度,從指定的紅色、綠色和藍色元素組合中建立色彩。

public static UIKit.UIColor FromRGBA (int red, int green, int blue, int alpha);
static member FromRGBA : int * int * int * int -> UIKit.UIColor

參數

red
Int32
green
Int32
blue
Int32
alpha
Int32

傳回

備註

這可從背景執行緒使用。

適用於