halfmoonui / halfmoon

Halfmoon is a highly customizable, drop-in Bootstrap replacement. It comes with three built-in core themes, with dark mode support for all themes and components.
https://www.gethalfmoon.com
MIT License
3.03k stars 118 forks source link

Dark mode too dark, light mode too light #52

Closed saumyasinghal747 closed 3 years ago

saumyasinghal747 commented 3 years ago

I introduced myself in a previous issue also, I'm the author of YMath.io. There, I have programmed my own dark mode using CSS variables but want to switch over to Halfmoon because I'm redoing the site. I was feeling that there are some improvements that could be made to the Halfmoon dark mode.

  1. For one, I highly recommend using Apple's Human Interface Guidelines for light and dark mode for the different colors.
  2. If you don't do that, then what really matters is depth. The dark mode is good in the sense that different components are different greys. But when I switch to light mode, everything is white. It would definitely help to keep the depth that you introduced in dark mode when the user enables light mode. YMath uses Apple's colors to do this, for example, notice how there are 3 different shades used here: image
image

Discord is also a site that has written a great light/dark transition, although they are quite blue.

This framework is going in a great direction, keep it up! I especially love the sidebar!

halfmoonui commented 3 years ago

I will use this issue to explain the design choices I made regarding the light mode and dark mode, specifically in relation to the depth:

What you are saying is a concept popularized by design systems such as Material Design, where the webpage is treated like a piece of paper with a light source on top. In such a system, cards would lay on top of the background, so it would be a lighter color than the background. However, Halfmoon is not a design system, and personally, I think the current design maximizes readability while keeping the sections separate and distinct. It can be argued that having the background be gray in light mode (instead of white) would make the text harder to read, because the contrast would go down.

Moreover, I think a lot of times, the use of depth brings almost nothing beneficial in terms of usability, because a webpage is not a piece of paper with a light source on top. The only thing I personally care about is keeping the sections distinct and separate, and making sure everything is readable and nice to look at. The separation can be achieved by nice strong borders, different background colors, box shadows, whatever. But again, that is just my opinion and I am not a fan of those types of design systems.

In any case, this is probably one of those things that really comes down to personal preference. In your case, if you want your version of Halfmoon to look like what you described, all you have to do is change the --lm-base-body-bg-color variable.

halfmoonui commented 3 years ago

Since I have explained the design choices I made regarding the light mode and dark mode, I will go ahead and close this issue. You can re-open it if you think the issue is still not resolved, or open another issue. Thank you.