Freigeben über


ColorObject.Rgb Method

Definition

Overloads

Rgb(Int32, Int32, Int32)

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

Rgb(Single, Single, Single)

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

Rgb(Int32, Int32, Int32)

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

[Android.Runtime.Register("rgb", "(III)I", "")]
public static int Rgb (int red, int green, int blue);
[<Android.Runtime.Register("rgb", "(III)I", "")>]
static member Rgb : int * int * int -> int

Parameters

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 red, green, blue components. The alpha component is implicitly 255 (fully opaque). 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.rgb(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

Rgb(Single, Single, Single)

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

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

Parameters

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 red, green, blue float components in the range \([0..1]\). The alpha component is implicitly 1.0 (fully opaque). If the components are out of range, the returned color is undefined.

Java documentation for android.graphics.Color.rgb(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