mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
Larp max char color
This commit is contained in:
1 parent
fd74014e20
commit
f3e32a2ca9
1 file changed
+8
-17
@@ -307,23 +307,14 @@ internal static class ChatPatch
|
||||
|
||||
private static Color GetCharColor(int length, Color color)
|
||||
{
|
||||
Color[] colorGradient =
|
||||
[
|
||||
Color.green,
|
||||
Color.yellow,
|
||||
Color.red
|
||||
];
|
||||
|
||||
switch (length)
|
||||
{
|
||||
case int n when n > 117:
|
||||
if (ColorUtility.TryParseHtmlString("#ff0000", out Color newColor1))
|
||||
color = newColor1;
|
||||
break;
|
||||
case int n when n > 74:
|
||||
if (ColorUtility.TryParseHtmlString("#ffff00", out Color newColor3))
|
||||
color = newColor3;
|
||||
break;
|
||||
default:
|
||||
if (ColorUtility.TryParseHtmlString("#00f04c", out Color newColor4))
|
||||
color = newColor4;
|
||||
break;
|
||||
}
|
||||
|
||||
return color;
|
||||
(float min, float max) lerpRange = (0f, 117f);
|
||||
return colorGradient.LerpColor(lerpRange, length);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user