From 9de3f8a66eaddf8af36a04c6c834e57775b3b026 Mon Sep 17 00:00:00 2001
From: wolframhaussig <13997737+wolframhaussig@users.noreply.github.com>
Date: Tue, 27 Feb 2024 19:17:56 +0100
Subject: [PATCH] allow access to GetSoftenedColor for library users (#34)
---
WinFormsThemes/WinFormsThemes/Themes/AbstractTheme.cs | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/WinFormsThemes/WinFormsThemes/Themes/AbstractTheme.cs b/WinFormsThemes/WinFormsThemes/Themes/AbstractTheme.cs
index 40c856d..c991b39 100644
--- a/WinFormsThemes/WinFormsThemes/Themes/AbstractTheme.cs
+++ b/WinFormsThemes/WinFormsThemes/Themes/AbstractTheme.cs
@@ -279,9 +279,13 @@ public void UseLogger(ILoggerFactory loggerFactory)
/// Softened color
///
/// This should primarily thought of as helper function to use the same colors and modify them
- /// dependent on dark/light theme.
+ /// dependent on dark/light theme.
+ /// Although this could be done as a static method, I find it more easily understandable for a user to have
+ /// it as an instance method
///
- protected static Color GetSoftenedColor(Color baseColor, bool switchDarkAndLight = false)
+#pragma warning disable CA1822 // Member als statisch markieren
+ public Color GetSoftenedColor(Color baseColor, bool switchDarkAndLight = false)
+#pragma warning restore CA1822 // Member als statisch markieren
{
// HSL lightness value 0 = black, 1 = white
if (baseColor.GetBrightness() < 0.5 || switchDarkAndLight)