Partager via


ColorObject.Argb Method

Definition

Overloads

Argb(Int32, Int32, Int32, Int32)

Return a color-int from alpha, red, green, blue components.

Argb(Single, Single, Single, Single)

Return a color-int from alpha, red, green, blue float components in the range ([0.

Argb(Int32, Int32, Int32, Int32)

Return a color-int from alpha, red, green, blue components.

[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

Parameters

alpha
Int32

Alpha component ([0..255]) of the color

red
Int32

Red component ([0..255]) of the color

green
Int32

Green component ([0..255]) of the color

blue
Int32

Blue component ([0..255]) of the color

Returns

Attributes

Remarks

Return a color-int from alpha, red, green, blue components. These component values should be \([0..255]\), but there is no range check performed, so if they are out of range, the returned color is undefined.

Java documentation for android.graphics.Color.argb(int, int, int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Argb(Single, Single, Single, Single)

Return a color-int from alpha, red, green, blue float components in the range ([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

Parameters

alpha
Single

Alpha component ([0..1]) of the color

red
Single

Red component ([0..1]) of the color

green
Single

Green component ([0..1]) of the color

blue
Single

Blue component ([0..1]) of the color

Returns

Attributes

Remarks

Return a color-int from alpha, red, green, blue float components in the range \([0..1]\). If the components are out of range, the returned color is undefined.

Java documentation for android.graphics.Color.argb(float, float, float, float).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to