Chromium Code Reviews| Index: ui/gfx/color_utils.cc |
| diff --git a/ui/gfx/color_utils.cc b/ui/gfx/color_utils.cc |
| index a4618f27e66f5e383e0d175dba9e2cf7b7b4e6be..a517b1dc1d4863cb161202763308b78bdba12315 100644 |
| --- a/ui/gfx/color_utils.cc |
| +++ b/ui/gfx/color_utils.cc |
| @@ -328,15 +328,14 @@ bool IsInvertedColorScheme() { |
| #endif // !defined(OS_WIN) |
| SkColor DeriveDefaultIconColor(SkColor text_color) { |
| - // This function works similarly to BlendTowardOppositeLuminance, but uses a |
| - // different blend value for lightening and darkening. |
| + // Lighten a dark color but leave it fully opaque. |
| if (IsDark(text_color)) { |
| // For black text, this comes out to kChromeIconGrey. |
| return color_utils::AlphaBlend(SK_ColorWHITE, text_color, |
| SkColorGetR(gfx::kChromeIconGrey)); |
| } |
| - // The dimming is less dramatic when darkening a light color. |
| - return color_utils::AlphaBlend(SK_ColorBLACK, text_color, 0x33); |
| + // For a light color, just set an opacity. |
| + return SkColorSetA(text_color, 0xCC); |
|
sky
2016/05/13 19:29:34
Might test_color have an alpha < 0xCC?
Evan Stade
2016/05/13 21:20:44
yea, I guess text color can be non-opaque (theme-c
|
| } |
| } // namespace color_utils |