using System;
using System.Linq;
using System.Globalization;
public class Program
{
public static void Main()
double[] values = [1, 23, 2.8, 22, 4];
double minValue = values.Min();
double maxValue = values.Max();
string[] blueToGreenColors = values.Select(v => BlueToGreenColorMap(v, minValue, maxValue)).ToArray();
string[] lightToIntenseGreen = values.Select(v => LightToGreenColorMap(v, minValue, maxValue)).ToArray();
Console.WriteLine(string.Join(", ", values));
Console.WriteLine(string.Join(", ", blueToGreenColors));
Console.WriteLine(string.Join(", ", lightToIntenseGreen));
}
public static string BlueToGreenColorMap(double value, double minValue, double maxValue)
return $"hsl({Math.Round(200-70*((value-minValue)/(maxValue-minValue)))}, 80%, 70%)";
public static string LightToGreenColorMap(double value, double minValue, double maxValue)
return $"hsl(130, 80%, {Math.Round(60+40*(1-(value-minValue)/(maxValue-minValue)))}%)";