public object Convert(object value, [CanBeNull] Type targetType, object parameter, [CanBeNull] CultureInfo culture) { try { return(new SolidColorBrush(BackgroundColors.GetColor(System.Convert.ToInt32(value, CultureInfo.InvariantCulture), _themeManager.IsDarkTheme))); } catch { return(null); } }
private Color GetNextColor([CanBeNull] string text) { return(BackgroundColors.GetColor(_mappingCache.Count, _themeManager.IsDarkTheme)); }