Representation of RGBA colors.
表示RGBA颜色。
This structure is used throughout Unity to pass colors around. Each color component is a floating point value with a range from 0 to 1.
这个个结构被用来在整个Unity中传递颜色。每个颜色的组件是一个范围从0到1之间的浮点型值。
Components (r,g,b) define a color in RGB color space. Alpha component (a) defines transparency - alpha of one is completely opaque, alpha of zero is completely transparent.
组件 (r,g,b) 在RGB颜色空间内定义一个颜色。 Alpha组件(a) 定义透明度 — alpha 值是 1 是完全不透明,alpha 值是 0 是完全透明。
black | Solid black. RGBA is (0, 0, 0, 1). 纯黑。RGBA是(0, 0, 0, 1)。 |
blue | Solid blue. RGBA is (0, 0, 1, 1). 纯蓝。RGBA是(0, 0, 1, 1)。 |
clear | Completely transparent. RGBA is (0, 0, 0, 0). 完全透明的。RGBA是(0, 0, 0, 0)。 |
cyan | Cyan. RGBA is (0, 1, 1, 1). 蓝绿色。RGBA是(0, 1, 1, 1)。 |
gray | Gray. RGBA is (0.5, 0.5, 0.5, 1). 灰色。RGBA 是(0.5, 0.5, 0.5, 1)。 |
green | Solid green. RGBA is (0, 1, 0, 1). 纯绿色。RGBA是(0, 1, 0, 1)。 |
grey | English spelling for gray. RGBA is the same (0.5, 0.5, 0.5, 1). 英语称作gray。RGBA与(0.5, 0.5, 0.5, 1)一样。 |
magenta | Magenta. RGBA is (1, 0, 1, 1). 品红色。RGBA是(1, 0, 1, 1)。 |
red | Solid red. RGBA is (1, 0, 0, 1). 纯红色。RGBA是(1, 0, 0, 1)。 |
white | Solid white. RGBA is (1, 1, 1, 1). 纯白色。RGBA是(1, 1, 1, 1)。 |
yellow | Yellow. RGBA is (1, 0.92, 0.016, 1), but the color is nice to look at! 黄色。RGBA是(1, 0.92, 0.016, 1),但是这个颜色看起来不是那么完美! |
a | Alpha component of the color. 颜色的透明通道组建。 |
b | Blue component of the color. 颜色的蓝组件。 |
g | Green component of the color. 颜色的绿组件。 |
gamma | A version of the color that has had the gamma curve applied. 颜色的版本,该版本应用了伽马曲线。 |
grayscale | The grayscale value of the color. (Read Only) 颜色的灰度值。(只读) |
linear | A version of the color that has had the inverse gamma curve applied. sRGB颜色的线性值。 |
maxColorComponent | Returns the maximum color component value: Max(r,g,b). 返回颜色组件最大值:Max(r,g,b)。 |
r | Red component of the color. 颜色的红色组件。 |
this[int] | Access the r, g, b,a components using [0], [1], [2], [3] respectively. 使用 r, g, b,a组件,使用[0], [1], [2], [3]表示。 |
Color | Constructs a new Color with given r,g,b,a components. 构造一个新的颜色,使用指定r,g,b,a组件。 |
ToString | Returns a nicely formatted string of this color. 返回一个良好该颜色的格式化字符串。 |
HSVToRGB | Creates an RGB colour from HSV input. 从HSV输入创建一个RGB颜色。 |
Lerp | Linearly interpolates between colors a and b by t. 颜色a和颜色b之间的线性差值t。 |
LerpUnclamped | Linearly interpolates between colors a and b by t. 颜色a和b之间的线性差值t。 |
RGBToHSV | Calculates the hue, saturation and value of an RGB input color. 计算色调,饱和度和输入颜色的RGB值。 |
Color | Colors can be implicitly converted to and from Vector4. 颜色可以被隐式转换成四维向量。 |
operator - | Subtracts color b from color a. Each component is subtracted separately. 颜色a减去颜色b。每个组件都分开相减。 |
operator * | Multiplies two colors together. Each component is multiplied separately. 两颜色相乘。每个组件分开相乘。 |
operator / | Divides color a by the float b. Each color component is scaled separately. 颜色a除以变量b。每个颜色组件都分开除以该数值。 |
operator + | Adds two colors together. Each component is added separately. 两个颜色相加。每个组件分别相加 |
Vector4 | Colors can be implicitly converted to and from Vector4. 颜色可以隐式转换成四维向量。 |