server icon indicating copy to clipboard operation
server copied to clipboard

Rework theming logic to invert header icon color

Open justin-sleep opened this issue 9 years ago • 5 comments

The current method of determining whether or not to invert the color for header icons (after 68a63ad3f33c683d726219a508bb31de7b9ab1d0) is insufficient. Currently, it allows darker icons on a fairly dark background, e.g. my current theme color:

1494362061

One possible solution would be to raise the lightness threshold for inverting the colors. This is what it looks like after I raised the threshold past 55 (my background color's lightness):

1494363045

As what looks 'better' may vary from person to person, another possible solution to this would be to simply allow the user a button in the theming interface to toggle dark/light header icons.

Steps to reproduce

  1. Open theming settings
  2. Change background color to a value straddling the lightness threshold (e.g. #745CBA)

Expected behaviour

The header icon colors should not be dark.

Actual behaviour

The header icon colors invert to their dark variants.

justin-sleep avatar May 09 '17 20:05 justin-sleep

@juliushaertl

MariusBluem avatar May 10 '17 07:05 MariusBluem

@justin-sleep Makes sense, but we should make sure that there isn't an issue with another color with this new threshold.

juliusknorr avatar May 15 '17 22:05 juliusknorr

@juliushaertl could you have a look again.

Seems like OCA.Theming.inverted is set to true but not used by the header menu:

dateien_-jobisch_cloud-_2017-07-31_11 14 57

Notifications icon is black because it uses the value. https://github.com/nextcloud/notifications/blob/ca1977cf6ee28c835985892ff6f74c6f13630db8/js/app.js#L388

This worked in 11, now broken on 12

nickvergessen avatar Jul 31 '17 09:07 nickvergessen

Fixed in #6344

MorrisJobke avatar Sep 03 '17 12:09 MorrisJobke

Good proposal @justin-sleep! More design feedback and contributions are appreciated :)

jancborchardt avatar Sep 05 '17 09:09 jancborchardt