语言

ColorObject.Red 方法

定义

重载

名称 说明
Red(Int64)

返回以指定颜色长度编码的红色分量。

Red(Color)

返回颜色 int 的红色分量。

Red()

返回此颜色的颜色空间定义的区域中红色分量的值(见 ColorSpace#getMinValue(int) 和 ColorSpace#getMaxValue(int))。

Red(Int64)

返回以指定颜色长度编码的红色分量。

[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

参数

color
Int64

要提取的红色通道的颜色长

返回

具有由指定颜色的颜色空间定义的范围的浮点值

特性

注解

返回以指定颜色长度编码的红色分量。 返回值的范围取决于与指定颜色关联的颜色空间。 可以通过调用 #colorSpace(long)来查询颜色空间。

Java文档android.graphics.Color.red(long)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

Red(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

参数

color
Color

提取其红色字节的打包 ARGB 颜色。

返回

值介于 0 和 255 之间(含 0 到 255)

特性

注解

返回颜色 int 的红色分量。这与说 (颜色 >> 16) 和 0xFF 相同

Java文档android.graphics.Color.red(int)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

Red()

返回此颜色的颜色空间定义的区域中红色分量的值(见 ColorSpace#getMinValue(int) 和 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

返回

第一个存储的颜色空间组件,该组件是 RGB 颜色的红色。

特性

注解

返回此颜色的颜色空间定义的区域中红色分量的值(见 ColorSpace#getMinValue(int) 和 ColorSpace#getMaxValue(int))。

如果此颜色的颜色模型不是 ColorSpace.Model#RGB RGB,则调用此方法等效 getComponent(0)于。

Java文档android.graphics.Color.red()。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于