virtualmin / virtualmin-gpl

Virtualmin web hosting control panel for Webmin
https://www.virtualmin.com
GNU General Public License v3.0
330 stars 102 forks source link

Subtle color-tinted dark theme sidebar background color based on light theme's sidebar color #650

Closed nekohayo closed 1 month ago

nekohayo commented 1 year ago

Related to the wish for an automated light/dark ("system") theme (#535), I have a complementary idea: automatically tinting the sidebar to match its light theme's primary color. An example mockup can be found below.


When is this useful?

I recently discovered that you can choose one of the primary preset colors for the Authentic Theme's sidebar, in Theme Configuration > Navigation Menu > Color Palette:

image

...and I found this to be very useful to be able to provide a visual distinction between my various home servers, because I often work on them all at once with multiple tabs/windows open, and being able to color their sidebars by "dangerosity" lets me avoid mistakes.

For example,

... that way I don't have to think about server names / look at the URL bar all the time. Especially when some vservers are present on multiple such servers (during migrations etc.), the colors are nice to avoid confusion.

However, when using the dark theme, those colors disappear completely.

So while my "red-colored" server could easily be spotted from 10 meters away:

light theme - red

...at night, it becomes identical to all other servers:

dark theme - current

Possible solution

One way this could maybe be conveniently achieved, would be for the dark theme to automatically inherit & tint its sidebar background color based on the light theme's chosen color. Maybe with some CSS filters (with less saturation and brightness and higher contrast), etc. So in the case of my red-colored server for example, it could become a bit like this, still dark but quickly recognizable:

dark theme - proposed

Throwing the idea out there. I hope you find the suggestion interesting 🦉

jcameron commented 1 year ago

@iliajie what do you think about this one?

iliajie commented 1 year ago

@iliajie what do you think about this one?

Jamie, I feel that adding a tint to the dark palette's navigation menu detracts from its aesthetics.

Jeff, there is an option in Authentic Theme configuration page, which enables you to add HTML snippet to the navigation menu (for distinguishing purposes).

iliajie commented 1 month ago

I will close this one, as I won’t be able to implement it.