Outlook calendar/event syncing basics without delta. Bunch of UI updates for the calendar view.

This commit is contained in:
Burak Kaan Köse
2025-01-06 02:15:21 +01:00
parent a7674d436d
commit 125c277c88
46 changed files with 1104 additions and 356 deletions

View File

@@ -3,18 +3,24 @@ using System.Drawing;
namespace Wino.Core.Misc
{
public static class RandomFlatColorGenerator
public static class ColorHelpers
{
public static Color Generate()
public static string GenerateFlatColorHex()
{
Random random = new();
int hue = random.Next(0, 360); // Full hue range
int saturation = 70 + random.Next(30); // High saturation (70-100%)
int lightness = 50 + random.Next(20); // Bright colors (50-70%)
return FromHsl(hue, saturation, lightness);
var color = FromHsl(hue, saturation, lightness);
return ToHexString(color);
}
public static string ToHexString(this Color c) => $"#{c.R:X2}{c.G:X2}{c.B:X2}";
public static string ToRgbString(this Color c) => $"RGB({c.R}, {c.G}, {c.B})";
private static Color FromHsl(int h, int s, int l)
{
double hue = h / 360.0;