語言

ColorObject.Argb 方法

定義

多載

名稱 Description
Argb(Int32, Int32, Int32, Int32)

從 alpha、red、green、blue 元件回傳一個顏色-int。

Argb(Single, Single, Single, Single)

從範圍內的 alpha、red、green、blue float 組件回傳 color-int ([0.

Argb(Int32, Int32, Int32, Int32)

從 alpha、red、green、blue 元件回傳一個顏色-int。

[Android.Runtime.Register("argb", "(IIII)I", "")]
public static int Argb(int alpha, int red, int green, int blue);
[<Android.Runtime.Register("argb", "(IIII)I", "")>]
static member Argb : int * int * int * int -> int

參數

alpha
Int32

顏色的α成分([0..255])

red
Int32

紅色分量([0..255])的顏色

green
Int32

綠色分量([0..255])為

blue
Int32

藍色分量([0..255])為

傳回

屬性

備註

從 alpha、red、green、blue 元件回傳一個顏色-int。 這些成分值應為 \([0..255]\),但未進行範圍檢查,若超出範圍,回傳顏色即未定義。

Java 文件 android.graphics.Color.argb(int, int, int, int)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

Argb(Single, Single, Single, Single)

從範圍內的 alpha、red、green、blue float 組件回傳 color-int ([0.

[Android.Runtime.Register("argb", "(FFFF)I", "", ApiSince=26)]
public static int Argb(float alpha, float red, float green, float blue);
[<Android.Runtime.Register("argb", "(FFFF)I", "", ApiSince=26)>]
static member Argb : single * single * single * single -> int

參數

alpha
Single

顏色的α成分([0..1])

red
Single

紅色分量([0..1])為顏色

green
Single

綠色分量([0..1])

blue
Single

藍色分量([0..1])的顏色

傳回

屬性

備註

回傳 Alpha、紅色、綠色、藍色浮點元件在 \([0..1]\) 範圍內的 color-int。 若元件超出範圍,回傳顏色則未定義。

Java 文件 android.graphics.Color.argb(float, float, float, float)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於