20 lines
615 B
C#
20 lines
615 B
C#
using UnityEngine;
|
|
|
|
public static class ColorHelper
|
|
{
|
|
public static readonly Color OkayGreen = new Color(12f, 202f, 0f);
|
|
|
|
public const float TEXT_FADED_OPACITY = .5f;
|
|
public const float TEXT_FULL_OPACITY = 1f;
|
|
|
|
public static Color AddColorTint(Color originalColor, Color tintColor, float tintIntensity)
|
|
{
|
|
// Clamp the tintIntensity between 0 and 1
|
|
tintIntensity = Mathf.Clamp01(tintIntensity);
|
|
|
|
// Blend the original color with the tint color
|
|
Color blendedColor = Color.Lerp(originalColor, tintColor, tintIntensity);
|
|
|
|
return blendedColor;
|
|
}
|
|
}
|