Windows Dark Mode: Update inactive tint to avoid hue shift
Bug: 1052427 This follows up http://crrev.com/c/1941064. The hue shift, with certain accent colors could cause unexpected changes like a red accent titlebar turning to blue when inactive. This change is to remove the hue shift so the color overall stays in the same space but to still maintain as close to the kGoogleGrey900 (0x20, 0x21, 0x24) -> kGoogleGrey800 (0x3C, 0x40, 0x43) as possible. With kGoogleGrey900 as the input, this code outputs (0x3B, 0x3E, 0x44). I chose this one because it was very close to (0x3C, 0x40, 0x43) and kept the overall color biased towards the green and blue channels. Some other options considered were: return {-1, 0.53, 0.567}; #3C3E43 return {-1, -1, 0.57}; #3F4043 return {-1, -1, 0.569}; #3F4042 return {-1, -1, 0.572}; #404144 return {-1, -1, 0.568}; #3E3F42 return {-1, 0.55, 0.567}; #3B3D44 return {-1, 0.54, 0.567}; #3B3E44 return {-1, 0.54, 0.57}; #3D3F45 Boosting the red channel and losing the green were resulting in slightly warm and faded colors that didn't feel like they fit in the Chromium color set. Tested against the default Windows set of accent colors and saw differentiation between active and inactive windows without unexpected color shifts. As a note on existing behavior, the colors of the new tab button and background tab text can switch between active/inactive window states. Change-Id: Ib67d11c720c58036cb255aee743916d6a8f2bab9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2063737 Commit-Queue: Peter Kasting <pkasting@chromium.org> Reviewed-by:Peter Kasting <pkasting@chromium.org> Cr-Commit-Position: refs/heads/master@{#742803}
Showing
Please register or sign in to comment