返回介绍

Color32 32位颜色

发布于 2019-12-18 15:37:34 字数 2890 浏览 890 评论 0 收藏 0

struct in UnityEngine

Description 描述

Representation of RGBA colors in 32 bit format.

表示32位格式RGBA颜色。

Each color component is a byte value with a range from 0 to 255.

每个颜色通道的字节值范围从0到255。

Components (r,g,b) define a color in RGB color space. Alpha component (a) defines transparency - alpha of 255 is completely opaque, alpha of zero is completely transparent.

通道(r,g,b) 在RGB颜色空间内定义一个颜色。 Alpha通道(a) 定义透明度 — alpha 值是 255 是完全不透明,alpha值是0表示完全透明。

Variables 变量

aAlpha component of the color.
该颜色的Alpha通道。
bBlue component of the color.
该颜色的蓝色通道。
gGreen component of the color.
该颜色的绿色通道。
rRed component of the color.
该颜色的红色通道。

Constructors 构造器

Color32Constructs 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 静态函数

LerpLinearly interpolates between colors a and b by t.
通过t在颜色a和b之间线性插值。
LerpUnclampedLinearly interpolates between colors a and b by t.
通过t在颜色a和b之间线性插值。

Operators 运算符

ColorColor32 can be implicitly converted to and from Color.
Color32隐式转换到Color。
Color32Color can be implicitly converted to and from Color32.
Color隐式转换为Color32。

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文