Mandator Erweitert + Setting Page Anbindung

This commit is contained in:
2024-12-05 14:20:14 +01:00
parent 688ac1de9a
commit d50a925b95
9 changed files with 189 additions and 13 deletions

View File

@@ -78,5 +78,18 @@ namespace BS.Shared.Extensions
}
public static bool IsBrighter(this Color c, double threshold) => c.GetBrightness() > threshold;
public static Color Parse(string str)
{
return (Color)ColorConverter.ConvertFromString(str);
}
public static SolidColorBrush ParseSolidColorBrush(string str)
{
if (str is null)
return null;
return (SolidColorBrush)new BrushConverter().ConvertFrom(str);
}
}
}