diff --git a/Mac/MainWindow/Detail/styleSheet.css b/Mac/MainWindow/Detail/styleSheet.css index 99e9782ed..ae2765f0c 100644 --- a/Mac/MainWindow/Detail/styleSheet.css +++ b/Mac/MainWindow/Detail/styleSheet.css @@ -10,16 +10,16 @@ body { :root { --body-color: #444; --body-background-color: -apple-system-text-background; - --accent-color: rgba([[accent-r]], [[accent-g]], [[accent-b]], .75); - --block-quote-border-color: rgba([[accent-r]], [[accent-g]], [[accent-b]], .50); + --accent-color: rgb(8, 106, 238, 1); + --block-quote-border-color: rgb(8, 106, 238, .50); } @media(prefers-color-scheme: dark) { :root { --body-color: #d2d2d2; --body-background-color: #2d2d2d; - --accent-color: rgba([[accent-r]], [[accent-g]], [[accent-b]], .75); - --block-quote-border-color: rgba([[accent-r]], [[accent-g]], [[accent-b]], .50); + --accent-color: rgba(45, 128, 241, 1); + --block-quote-border-color: rgba(45, 128, 241, .50); --header-table-border-color: rgba(255, 255, 255, 0.1); } } diff --git a/Shared/Article Rendering/ArticleRenderer.swift b/Shared/Article Rendering/ArticleRenderer.swift index 90ae8b807..dd95ed15a 100644 --- a/Shared/Article Rendering/ArticleRenderer.swift +++ b/Shared/Article Rendering/ArticleRenderer.swift @@ -276,32 +276,6 @@ private extension ArticleRenderer { d["font-size"] = String(describing: Int(round(bodyFont.pointSize * 1.33))) #endif - guard let linkColor = NSColor.controlAccentColor.usingColorSpace(.deviceRGB) else { - return d - } - - let red: Int - let green: Int - let blue: Int - - if NSApplication.shared.effectiveAppearance.isDarkMode { - let brighten = CGFloat(0.50) - let baseRed = linkColor.redComponent * 0xFF - red = Int(round(((255 - baseRed) * brighten)) + round(baseRed)) - let baseGreen = linkColor.greenComponent * 0xFF - green = Int(round(((255 - baseGreen) * brighten)) + round(baseGreen)) - let baseBlue = linkColor.blueComponent * 0xFF - blue = Int(round(((255 - baseBlue) * brighten)) + round(baseBlue)) - } else { - let darken = CGFloat(0.75) - red = Int(round(linkColor.redComponent * 0xFF * darken)) - green = Int(round(linkColor.greenComponent * 0xFF * darken)) - blue = Int(round(linkColor.blueComponent * 0xFF * darken)) - } - - d["accent-r"] = String(red) - d["accent-g"] = String(green) - d["accent-b"] = String(blue) return d } #endif