internal void AddPlayerColor(String player, Color color) { ColorHls hlsValue = HLSColor.RgbToHls(color); this.PlayerBrushes[player] = new List <Brush>(); this.PlayerBrushes[player].Add(new SolidColorBrush(HLSColor.HlsToRgb(hlsValue.H, Math.Min(1d, hlsValue.L * 1.1), hlsValue.S, hlsValue.A))); this.PlayerBrushes[player].Add(new SolidColorBrush(HLSColor.HlsToRgb(hlsValue.H, Math.Min(1d, hlsValue.L * 1.125), hlsValue.S * 0.95, hlsValue.A))); this.PlayerBrushes[player].Add(new SolidColorBrush(HLSColor.HlsToRgb(hlsValue.H, hlsValue.L * 0.25, hlsValue.S, hlsValue.A))); this.PlayerBrushes[player].ForEach((b) => b.Freeze()); }
public ucPlayerSettings() { InitializeComponent(); scpTint.Clear(); for (int h = 0; h < 15; h++) { scpTint.AddColor(HLSColor.HlsToRgb(24 * h, 0.85, 1, 1)); } scpTint.AddColor(Colors.Transparent); }