|
@@ -71,6 +71,7 @@ namespace ZIM.Unity
|
|
|
// 转换为整数再计算
|
|
// 转换为整数再计算
|
|
|
public static int Brightness(this Color c, int colorBits)
|
|
public static int Brightness(this Color c, int colorBits)
|
|
|
{
|
|
{
|
|
|
|
|
+ colorBits -= 1;
|
|
|
int r = (int)(c.r * colorBits);
|
|
int r = (int)(c.r * colorBits);
|
|
|
int g = (int)(c.g * colorBits);
|
|
int g = (int)(c.g * colorBits);
|
|
|
int b = (int)(c.b * colorBits);
|
|
int b = (int)(c.b * colorBits);
|