Tune omnibar pill tint toward theme background
This commit is contained in:
parent
0eef387d5d
commit
0d03b58be8
2 changed files with 5 additions and 5 deletions
|
|
@ -186,11 +186,11 @@ func resolvedBrowserOmnibarPillBackgroundColor(
|
|||
let accentMix: CGFloat
|
||||
switch colorScheme {
|
||||
case .light:
|
||||
accentMix = 0.08
|
||||
accentMix = 0.02
|
||||
case .dark:
|
||||
accentMix = 0.12
|
||||
accentMix = 0.03
|
||||
@unknown default:
|
||||
accentMix = 0.08
|
||||
accentMix = 0.02
|
||||
}
|
||||
|
||||
return themeBackgroundColor.blended(withFraction: accentMix, of: accentColor) ?? themeBackgroundColor
|
||||
|
|
|
|||
|
|
@ -691,11 +691,11 @@ final class BrowserPanelChromeBackgroundColorTests: XCTestCase {
|
|||
|
||||
final class BrowserPanelOmnibarPillBackgroundColorTests: XCTestCase {
|
||||
func testLightModeUsesSubtleAccentTintOverThemeBackground() {
|
||||
assertResolvedColorMatchesExpectedBlend(for: .light, accentMix: 0.08)
|
||||
assertResolvedColorMatchesExpectedBlend(for: .light, accentMix: 0.02)
|
||||
}
|
||||
|
||||
func testDarkModeUsesSlightlyStrongerAccentTintOverThemeBackground() {
|
||||
assertResolvedColorMatchesExpectedBlend(for: .dark, accentMix: 0.12)
|
||||
assertResolvedColorMatchesExpectedBlend(for: .dark, accentMix: 0.03)
|
||||
}
|
||||
|
||||
private func assertResolvedColorMatchesExpectedBlend(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue