using UnityEngine; public static class ColorUtility { public static Color AddGreyShade(Color originalColor, float greyIntensity) { // Clamp the greyIntensity between 0 and 1 greyIntensity = Mathf.Clamp01(greyIntensity); // Define the grey color (e.g., medium grey) Color grey = new Color(0.5f, 0.5f, 0.5f); // RGB (128, 128, 128) // Blend the original color with the grey color Color blendedColor = Color.Lerp(originalColor, grey, greyIntensity); return blendedColor; } }