当前位置:首页 > 话题广场 > 攻略专题 > 游戏问答

怎么给unity添加字体颜色看这里!unity 中文API之Color颜色

颜色颜色

Description说明

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 静态变量

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, 1).

灰色。RGBA 是, 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, 1).

英语称作gray。RGBA与, 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),但是这个颜色看起来不是那么完美!

Variables 变量

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]表示。

Constructors 构造器

Color Constructs a new Color with given r,g,b,a components.

构造一个新的颜色,使用指定r,g,b,a组件。

Public Functions 共有函数

ToString Returns a nicely formatted string of this color.

返回一个良好该颜色的格式化字符串。

Static Functions 静态函数

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值。

operators 操作符

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.

颜色可以隐式转换成四维向量。

1.《怎么给unity添加字体颜色看这里!unity 中文API之Color颜色》援引自互联网,旨在传递更多网络信息知识,仅代表作者本人观点,与本网站无关,侵删请联系页脚下方联系方式。

2.《怎么给unity添加字体颜色看这里!unity 中文API之Color颜色》仅供读者参考,本网站未对该内容进行证实,对其原创性、真实性、完整性、及时性不作任何保证。

3.文章转载时请保留本站内容来源地址,https://www.lu-xu.com/gl/3359183.html

上一篇

怎么创建一键ghost看这里!这才是启动Ghost的正确方式,非UEFI也能这样做,小白一学就会

怎么给unity添加字体颜色?终于找到答案了unity颜色转换之字符串转Color

怎么给unity添加字体颜色相关介绍,在Unity开发引擎中,颜色以多种方式表示,其中一种是字符串,另一种是封装在Color中的结构链,如何将字符串集转换为Color(rgba)?请观看以下代码演示。 Using System Using...

关于怎么给unity添加字体颜色,你需要知道这些游戏开发教育之UGUI系列——UGUI基础!界面拼接!

  • 关于怎么给unity添加字体颜色,你需要知道这些游戏开发教育之UGUI系列——UGUI基础!界面拼接!
  • 关于怎么给unity添加字体颜色,你需要知道这些游戏开发教育之UGUI系列——UGUI基础!界面拼接!
  • 关于怎么给unity添加字体颜色,你需要知道这些游戏开发教育之UGUI系列——UGUI基础!界面拼接!

怎么给unity添加字体颜色?总结很全面速看!UGUI动态设置对象大小和颜色(Image, Button)

  • 怎么给unity添加字体颜色?总结很全面速看!UGUI动态设置对象大小和颜色(Image, Button)
  • 怎么给unity添加字体颜色?总结很全面速看!UGUI动态设置对象大小和颜色(Image, Button)
  • 怎么给unity添加字体颜色?总结很全面速看!UGUI动态设置对象大小和颜色(Image, Button)