Skip to content

Commit

Permalink
Improve contrast of default themes
Browse files Browse the repository at this point in the history
  • Loading branch information
danielchalmers committed Jul 30, 2024
1 parent d58add6 commit 419956d
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions DesktopClock/Data/Theme.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,20 @@ public Theme(string name, string primaryColor, string secondaryColor)
/// Built-in themes that the user can use without specifying their own palettes.
/// </summary>
/// <remarks>
/// https://www.materialui.co/colors - A100, A700.
/// https://www.materialui.co/colors
/// https://webaim.org/resources/contrastchecker
/// </remarks>
public static IReadOnlyList<Theme> DefaultThemes { get; } =
[
new("Light Text", "#F5F5F5", "#212121"),
new("Dark Text", "#212121", "#F5F5F5"),
new("Red", "#D50000", "#FF8A80"),
new("Pink", "#C51162", "#FF80AB"),
new("Purple", "#AA00FF", "#EA80FC"),
new("Blue", "#2962FF", "#82B1FF"),
new("Cyan", "#00B8D4", "#84FFFF"),
new("Green", "#00C853", "#B9F6CA"),
new("Orange", "#FF6D00", "#FFD180"),
new("Light Text", "#F7F7F7", "#212121"),
new("Dark Text", "#212121", "#F7F7F7"),
new("Red", "#D50000", "#FFC2BD"),
new("Pink", "#C51162", "#FFBDD2"),
new("Purple", "#AA00FF", "#F6CBFB"),
new("Blue", "#2962FF", "#C7DBFF"),
new("Cyan", "#00A8C2", "#A8FFFF"),
new("Green", "#00AD48", "#C9F8D4"),
new("Orange", "#FF6D00", "#FFEFD6"),
];

/// <summary>
Expand All @@ -55,4 +56,4 @@ public static Theme GetRandomDefaultTheme()
var index = random.Next(0, DefaultThemes.Count);
return DefaultThemes[index];
}
}
}

0 comments on commit 419956d

Please sign in to comment.