easonwong-de/Adaptive-Tab-Bar-Colour

Too little contrast between foreground and background colour

Closed this issue · 4 comments

On some sites, the foreground colour of the theme applied by the add-on depends on the Prefer Light Mode or Prefer Dark Mode setting, instead of being based on the background colour of the theme. This occasionally results in a browser toolbar that is difficult to read because there is too little contrast between the foreground and background colours.

Prefer Light Mode example

Screenshot 2022-07-27 at 17 57 38

Prefer Dark Mode example

Screenshot 2022-07-27 at 17 58 27

Would it be possible for the foreground colour of the theme to be determined independently from whether the add-on is set to prefer light mode or dark mode, so that there is always sufficient contrast between the foreground and background colours?

Thanks for the suggestion. I assume that by “foreground color” you refer to the color that is rendered when “color offset” is set (in your case the color of the tab bar).

At the moment, I reckon it’s still reasonable to let color scheme decide foreground color—whether to lighten or to dim the background color. So changing when the add-on uses light or dark theme might be the best way to solve the problem of text being unreadable. For example, in the first screenshot you’ve shown, the add-on shall choose dark mode—use white text and lightened foreground color.

Do I understand you correctly?

Thanks for your reply! By foreground colour, I am referring to the colour of the text and icons on the toolbar. By background colour, I am referring to the colour that has been chosen for the tab bar (blue, in the screenshots). In the screenshot labelled "Prefer Light Mode", you can see that the text and icons are black, which may be difficult to read against the blue background colour. In the screenshot labelled "Prefer Dark Mode", the text and icons are white, which is easier to read against the blue background colour.

My concern is that for some sites, the text and icon colour is dependent on whether the add-on is set to Prefer Light Mode or Prefer Dark Mode, instead of being dependent on the whether black or white would have more contrast with the background colour.

As for the "colour offset" behaviour, I think the current behaviour (offsets from Prefer Light Mode result in a darker colour, and offsets from Prefer Dark Mode result in a lighter colour) is reasonable and attractive. I would like to keep the current colour offset behaviour, while changing the colour used to render text and icons.

I hope that was sufficiently clear.

Thanks, that’s clear. It’ll be fixed soon.

v1.6.7 is out. I changed the text color selection behavior a little.