server icon indicating copy to clipboard operation
server copied to clipboard

--color-primary-element has bad contrast with dark primary colors on dark mode

Open reos-rcrozier opened this issue 1 year ago • 5 comments

Edited by @juliushaertl to match the server issue:

  • Set #1a3c34 as a primary color or pick a very darkish background image
  • See that certain elements do not have a proper contrast ratio

It turns out that --color-primary-element doesn't really account for the dark mode.

Screenshot 2023-05-04 at 08 34 52 Screenshot 2023-05-04 at 08 35 14 image

reos-rcrozier avatar May 03 '23 14:05 reos-rcrozier

Can you share which color you have configured in your theming app settings and which Nextcloud version you are using?

Do folder icons have the same color in the files app?

juliusknorr avatar May 03 '23 19:05 juliusknorr

Can you share which color you have configured in your theming app settings and which Nextcloud version you are using?

#1a3c34 Nextcloud 26.0.1

Do folder icons have the same color in the files app?

Yes they do.

reos-rcrozier avatar May 03 '23 23:05 reos-rcrozier

Ok, this seems more like a theming issue with dark mode then for those darkish colors.

I'll move this to https://github.com/nextcloud/server for that since text/collectives just used the --color-primary-element css variable from server which should rather adapt to the dark mode then.

juliusknorr avatar May 04 '23 06:05 juliusknorr

@jancborchardt @skjnldsv I'm not sure what the proper calculation could look like yet, so if you have any suggestion for this scenario that would be good.

juliusknorr avatar May 04 '23 06:05 juliusknorr

https://github.com/nextcloud/server/blob/9c3e06c046879857e91d7cf40cf2b9b6842ec0e7/apps/theming/lib/Themes/CommonThemeTrait.php#L42

We do not tell if the background is bright or not. Fix here https://github.com/nextcloud/server/pull/38063

skjnldsv avatar May 04 '23 08:05 skjnldsv