ColorObject.Red Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Red(Int64) |
Returns the red component encoded in the specified color long. |
Red(Color) |
Return the red component of a color int. |
Red() |
Returns the value of the red component in the range defined by this
color's color space (see |
Red(Int64)
Returns the red component encoded in the specified color long.
[Android.Runtime.Register("red", "(J)F", "", ApiSince=26)]
public static float Red (long color);
[<Android.Runtime.Register("red", "(J)F", "", ApiSince=26)>]
static member Red : int64 -> single
Parameters
- color
- Int64
The color long whose red channel to extract
Returns
A float value with a range defined by the specified color's color space
- Attributes
Remarks
Returns the red component encoded in the specified color long. The range of the returned value depends on the color space associated with the specified color. The color space can be queried by calling #colorSpace(long)
.
Java documentation for android.graphics.Color.red(long)
.
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
Red(Color)
Return the red component of a color int.
[Android.Runtime.Register("red", "(I)I", "")]
public static int Red (Android.Graphics.Color color);
[<Android.Runtime.Register("red", "(I)I", "")>]
static member Red : Android.Graphics.Color -> int
Parameters
- color
- Color
Returns
- Attributes
Remarks
Return the red component of a color int. This is the same as saying (color >> 16) & 0xFF
Java documentation for android.graphics.Color.red(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
Red()
Returns the value of the red component in the range defined by this
color's color space (see ColorSpace#getMinValue(int)
and
ColorSpace#getMaxValue(int)
).
[Android.Runtime.Register("red", "()F", "GetRedHandler", ApiSince=26)]
public virtual float Red ();
[<Android.Runtime.Register("red", "()F", "GetRedHandler", ApiSince=26)>]
abstract member Red : unit -> single
override this.Red : unit -> single
Returns
- Attributes
Remarks
Returns the value of the red component in the range defined by this color's color space (see ColorSpace#getMinValue(int)
and ColorSpace#getMaxValue(int)
).
If this color's color model is not ColorSpace.Model#RGB RGB
, calling this method is equivalent to getComponent(0)
.
Java documentation for android.graphics.Color.red()
.
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.