New
#1161
Excellent! - lets hope the world-wide crash reports reduce as well...
@Cliff S
FWIW.. this code says if light theme no opacity otherwise 0.5 opacity.
I can change the latter (which only applies to Dark theme by definition) and it's either invisible ( opacity =0 ) with the Accent background or too light (opacity 1) as opposed to bright -- which is what we are afterCode:public Brush AccentBright { get { Uri newWindowsTheme = Application.Current.Resources.MergedDictionaries[0].Source; float convert = (newWindowsTheme.ToString() == $"/Themes/Light.xaml") ? (float) 0 : (float) 0.5; Color newColour = (Color)ColorConverter.ConvertFromString(Accent); SolidColorBrush brush = new SolidColorBrush(ChangeColorBrightness(newColour, convert)); return brush; } }
The other thing I must mention is that the alpha value is static ('color.A' below) - is that the problem and should it be changed? and if so to what?
Code:public static Color ChangeColorBrightness(Color color, float correctionFactor) { float red = (float)color.R; float green = (float)color.G; float blue = (float)color.B; if (correctionFactor < 0) { correctionFactor = 1 + correctionFactor; red *= correctionFactor; green *= correctionFactor; blue *= correctionFactor; } else { red = (255 - red) * correctionFactor + red; green = (255 - green) * correctionFactor + green; blue = (255 - blue) * correctionFactor + blue; } return Color.FromArgb(color.A, (byte)red, (byte)green, (byte)blue);