用户工具

站点工具


侧边栏



Unity3D中文文档

script:unityengine:classes:color:color

Color 颜色

Description 描述

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 是完全透明。

Static Variables 静态变量

blackSolid black. RGBA is (0, 0, 0, 1).
纯黑。RGBA是(0, 0, 0, 1)。
blueSolid blue. RGBA is (0, 0, 1, 1).
纯蓝。RGBA是(0, 0, 1, 1)。
clearCompletely transparent. RGBA is (0, 0, 0, 0).
完全透明的。RGBA是(0, 0, 0, 0)。
cyanCyan. RGBA is (0, 1, 1, 1).
蓝绿色。RGBA是(0, 1, 1, 1)。
grayGray. RGBA is (0.5, 0.5, 0.5, 1).
灰色。RGBA 是(0.5, 0.5, 0.5, 1)。
greenSolid green. RGBA is (0, 1, 0, 1).
纯绿色。RGBA是(0, 1, 0, 1)。
greyEnglish spelling for gray. RGBA is the same (0.5, 0.5, 0.5, 1).
英语称作gray。RGBA与(0.5, 0.5, 0.5, 1)一样。
magentaMagenta. RGBA is (1, 0, 1, 1).
品红色。RGBA是(1, 0, 1, 1)。
redSolid red. RGBA is (1, 0, 0, 1).
纯红色。RGBA是(1, 0, 0, 1)。
whiteSolid white. RGBA is (1, 1, 1, 1).
纯白色。RGBA是(1, 1, 1, 1)。
yellowYellow. RGBA is (1, 0.92, 0.016, 1), but the color is nice to look at!
黄色。RGBA是(1, 0.92, 0.016, 1),但是这个颜色看起来不是那么完美!

Variables 变量

aAlpha component of the color.
颜色的透明通道组建。
bBlue component of the color.
颜色的蓝组件。
gGreen component of the color.
颜色的绿组件。
gammaA version of the color that has had the gamma curve applied.
颜色的版本,该版本应用了伽马曲线。
grayscaleThe grayscale value of the color. (Read Only)
颜色的灰度值。(只读)
linearA version of the color that has had the inverse gamma curve applied.
sRGB颜色的线性值。
maxColorComponentReturns the maximum color component value: Max(r,g,b).
返回颜色组件最大值:Max(r,g,b)。
rRed 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]表示。

Constructors 构造器

ColorConstructs a new Color with given r,g,b,a components.
构造一个新的颜色,使用指定r,g,b,a组件。

Public Functions 共有函数

ToStringReturns a nicely formatted string of this color.
返回一个良好该颜色的格式化字符串。

Static Functions 静态函数

HSVToRGBCreates an RGB colour from HSV input.
从HSV输入创建一个RGB颜色。
LerpLinearly interpolates between colors a and b by t.
颜色a和颜色b之间的线性差值t。
LerpUnclampedLinearly interpolates between colors a and b by t.
颜色a和b之间的线性差值t。
RGBToHSVCalculates the hue, saturation and value of an RGB input color.
计算色调,饱和度和输入颜色的RGB值。

Operators 操作符

ColorColors 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
script/unityengine/classes/color/color.txt · 最后更改: 2016/08/02 05:35 (外部编辑)