Share via


ColorObject.GetComponent(Int32) Method

Definition

Returns the value of the specified component in the range defined by this color's color space (see ColorSpace#getMinValue(int) and ColorSpace#getMaxValue(int)).

[Android.Runtime.Register("getComponent", "(I)F", "GetGetComponent_IHandler", ApiSince=26)]
public virtual float GetComponent (int component);
[<Android.Runtime.Register("getComponent", "(I)F", "GetGetComponent_IHandler", ApiSince=26)>]
abstract member GetComponent : int -> single
override this.GetComponent : int -> single

Parameters

component
Int32

Returns

Attributes

Remarks

Returns the value of the specified component in the range defined by this color's color space (see ColorSpace#getMinValue(int) and ColorSpace#getMaxValue(int)).

If the requested component index is #getComponentCount(), this method returns the alpha component, always in the range \([0..1]\).

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