Larp max char color

This commit is contained in:
D1GQ committed 2025-10-27 19:34:04 -05:00
1 parent fd74014e20
commit f3e32a2ca9
1 file changed
+8 -17
+8 -17
View File
@@ -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);
}
}