PuzzleGame/PuzzleGameProject/Assets/Scripts/ColorHelper.cs
2025-01-20 14:59:33 +01:00

17 lines
505 B
C#

using UnityEngine;
public static class ColorHelper
{
public static Color OkayGreen = new Color(12f, 202f, 0f);
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;
}
}