New issue
Advanced search Search tips

Issue 783546 link

Starred by 2 users

Issue metadata

Status: Archived
Owner: ----
Closed: Sep 13
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Stop using hardcoded icon colours such as gfx::kChromeIconGrey

Project Member Reported by patricia...@chromium.org, Nov 10 2017

Issue description

Replace the hard-coded icon colour with a more generic way to change the icon colour according to the gfx::NativeTheme. This will help avoid issues like using a non-high-contrast colour when Chrome is being viewed in say high contrast mode on Windows.

A suggested solution from tapted@:

"""
I think a lot of things use a hardcoded const -- gfx::kChromeIconGrey == #5a5a5a

For consistent treatment in high-contrast mode, I think that constant needs to be removed from ui/gfx/color_palette.h . Anything relying on it should be asking gfx::NativeTheme for kColorId_ButtonEnabledColor/kColorId_ButtonHoverColor or something new. NativeThemeWin can check IsUsingHighContrastTheme() and return something other than #5a5a5a
"""

See the first attached screenshot for an example of kChromeIconGrey being used when a different colour is more appropriate.

maxwalker@ thinks #fff 100% alpha (white) should be the colour we use instead (see attached).
 
pageinfo-highcontrast-wrongiconcolor.png
11.4 KB View Download
pageinfo-highcontrast-correcticoncolor.png
58.9 KB View Download
you can take the text color (in this case that used for "Certificate") and use DeriveDefaultIconColor
I think the problem is that DeriveDefaultIconColor doesn't give the result we want currently. The mocks say the icon colours should be black at 54% alpha, which works out to be #757575 / rgb(117, 117, 117) on a white background. DeriveDefaultIconColor(...GetColor(..., STYLE_PRIMARY)) gives back #6f6f6f / rgb(111, 111, 111), which is a little darker than that. Similarly using DeriveDefaultIconColor(...GetColor(..., STYLE_SECONDARY)) is too light.

I agree it's a good idea to just continue using DeriveDefaultIconColor() for now though - it's probably more accessible than hard-coding a colour.

maxwalker@ - is having icons coloured #6f6f6f instead of #757575 OK for now until we can fix this?
Yes, it's ok to to use #6f6f6f until the issue is fixed. Thanks!
Status: Archived (was: Available)
Archiving old bugs that haven't been actively assigned in over 180 days.

If you feel this issue should still be addressed, feel free to reopen it or to file a new issue. Thanks!
Archiving old bugs that haven't been actively assigned in over 180 days.

If you feel this issue should still be addressed, feel free to reopen it or to file a new issue. Thanks!

Sign in to add a comment