ColorObject.Pack Method

Definition

Overloads

Pack()

Packs this color into a color long.

Pack(Color)

Converts the specified ARGB color int to an RGBA color long in the sRGB color space.

Pack(Single, Single, Single)

Packs the sRGB color defined by the specified red, green and blue component values into an RGBA color long in the sRGB color space.

Pack(Single, Single, Single, Single)

Packs the sRGB color defined by the specified red, green, blue and alpha component values into an RGBA color long in the sRGB color space.

Pack(Single, Single, Single, Single, ColorSpace)

Packs the 3 component color defined by the specified red, green, blue and alpha component values into a color long in the specified color space.

Pack()

Packs this color into a color long.

[Android.Runtime.Register("pack", "()J", "GetPackHandler", ApiSince=26)]
public virtual long Pack ();
[<Android.Runtime.Register("pack", "()J", "GetPackHandler", ApiSince=26)>]
abstract member Pack : unit -> int64
override this.Pack : unit -> int64

Returns

A color long

Attributes

Remarks

Packs this color into a color long. See the documentation of this class for a description of the color long format.

Java documentation for android.graphics.Color.pack().

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

Pack(Color)

Converts the specified ARGB color int to an RGBA color long in the sRGB color space.

[Android.Runtime.Register("pack", "(I)J", "", ApiSince=26)]
public static long Pack (Android.Graphics.Color color);
[<Android.Runtime.Register("pack", "(I)J", "", ApiSince=26)>]
static member Pack : Android.Graphics.Color -> int64

Parameters

color
Color

The ARGB color int to convert to an RGBA color long in sRGB

Returns

A color long

Attributes

Remarks

Converts the specified ARGB color int to an RGBA color long in the sRGB color space. See the documentation of this class for a description of the color long format.

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

Pack(Single, Single, Single)

Packs the sRGB color defined by the specified red, green and blue component values into an RGBA color long in the sRGB color space.

[Android.Runtime.Register("pack", "(FFF)J", "", ApiSince=26)]
public static long Pack (float red, float green, float blue);
[<Android.Runtime.Register("pack", "(FFF)J", "", ApiSince=26)>]
static member Pack : single * single * single -> int64

Parameters

red
Single

The red component of the sRGB color to create, in ([0..1])

green
Single

The green component of the sRGB color to create, in ([0..1])

blue
Single

The blue component of the sRGB color to create, in ([0..1])

Returns

A color long

Attributes

Remarks

Packs the sRGB color defined by the specified red, green and blue component values into an RGBA color long in the sRGB color space. The alpha component is set to 1.0. See the documentation of this class for a description of the color long format.

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

Pack(Single, Single, Single, Single)

Packs the sRGB color defined by the specified red, green, blue and alpha component values into an RGBA color long in the sRGB color space.

[Android.Runtime.Register("pack", "(FFFF)J", "", ApiSince=26)]
public static long Pack (float red, float green, float blue, float alpha);
[<Android.Runtime.Register("pack", "(FFFF)J", "", ApiSince=26)>]
static member Pack : single * single * single * single -> int64

Parameters

red
Single

The red component of the sRGB color to create, in ([0..1])

green
Single

The green component of the sRGB color to create, in ([0..1])

blue
Single

The blue component of the sRGB color to create, in ([0..1])

alpha
Single

The alpha component of the sRGB color to create, in ([0..1])

Returns

A color long

Attributes

Remarks

Packs the sRGB color defined by the specified red, green, blue and alpha component values into an RGBA color long in the sRGB color space. See the documentation of this class for a description of the color long format.

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

Pack(Single, Single, Single, Single, ColorSpace)

Packs the 3 component color defined by the specified red, green, blue and alpha component values into a color long in the specified color space.

[Android.Runtime.Register("pack", "(FFFFLandroid/graphics/ColorSpace;)J", "", ApiSince=26)]
public static long Pack (float red, float green, float blue, float alpha, Android.Graphics.ColorSpace colorSpace);
[<Android.Runtime.Register("pack", "(FFFFLandroid/graphics/ColorSpace;)J", "", ApiSince=26)>]
static member Pack : single * single * single * single * Android.Graphics.ColorSpace -> int64

Parameters

red
Single

The red component of the color to create

green
Single

The green component of the color to create

blue
Single

The blue component of the color to create

alpha
Single

The alpha component of the color to create, in ([0..1])

colorSpace
ColorSpace

Returns

A color long

Attributes

Remarks

Packs the 3 component color defined by the specified red, green, blue and alpha component values into a color long in the specified color space. See the documentation of this class for a description of the color long format.

The red, green and blue components must be in the range defined by the specified color space. See ColorSpace#getMinValue(int) and ColorSpace#getMaxValue(int).

Java documentation for android.graphics.Color.pack(float, float, float, float, android.graphics.ColorSpace).

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