Commit 5ae6d69b authored by Peter Kasting's avatar Peter Kasting Committed by Commit Bot

Base the tab separator color on the tab background color.

Bug: 862664
Change-Id: I05e936b9f165278d46f7b9aee4dc1fe8dd20624c
Reviewed-on: https://chromium-review.googlesource.com/1139410
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: default avatarBret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578937}
parent fa6907a2
......@@ -118,11 +118,15 @@ SkColor BrowserNonClientFrameView::GetToolbarTopSeparatorColor() const {
SkColor BrowserNonClientFrameView::GetTabSeparatorColor() const {
DCHECK(MD::IsRefreshUi());
// TODO(pkasting): https://crbug.com/866689 Replace this with "blend
// background tab text color toward background tab background color at 46% or
// 1.84 contrast ratio, whichever is larger" (and make sure the blend is large
// enough in the default theme to not need adjusting).
constexpr SkAlpha kTabSeparatorAlpha = 0x4D; // 30%
const SkColor frame_color = GetFrameColor();
const SkColor tab_color = GetTabBackgroundColor(TAB_INACTIVE);
const SkColor base_color =
color_utils::BlendTowardOppositeLuma(frame_color, SK_AlphaOPAQUE);
return color_utils::AlphaBlend(base_color, frame_color, kTabSeparatorAlpha);
color_utils::BlendTowardOppositeLuma(tab_color, SK_AlphaOPAQUE);
return color_utils::AlphaBlend(base_color, tab_color, kTabSeparatorAlpha);
}
SkColor BrowserNonClientFrameView::GetTabBackgroundColor(TabState state) const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment