private string GetCustomStyle() { var color = AppAppearanceManager.Instance.AccentColor; return(BinaryResources.SrsStyle .Replace(@"#E20035", color.ToHexString()) .Replace(@"#CA0030", ColorExtension.FromHsb(color.GetHue(), color.GetSaturation(), color.GetBrightness() * 0.92).ToHexString())); }
private void OnHsbChanged() { if (_skip) { return; } _skip = true; var color = ColorExtension.FromHsb(Hue, 0.01 * Saturation, 0.01 * Brightness); Color = color; UpdateRgb(color); _skip = false; }
private static string PrepareStyle(string style, bool transparentBackgroundSupported) { var color = AppAppearanceManager.Instance.AccentColor; style = style .Replace(@"#E20035", color.ToHexString()) .Replace(@"#CA0030", ColorExtension.FromHsb(color.GetHue(), color.GetSaturation(), color.GetBrightness() * 0.92).ToHexString()); style = Regex.Replace(style, @"(?<=^|@media).+", m => ("" + m) .Replace(@"no-ads", SettingsHolder.Plugins.CefFilterAds ? @"all" : @"print") .Replace(@"transparent-bg", transparentBackgroundSupported ? @"all" : @"print")); return(style); }