Question for dark mode and custom color scheme users


I am reviewing my old tickets I found #17587 (Deprecate B_SHINE_COLOR and B_SHADOW_COLOR) – Haiku

Before I proceed with this I would like to confirm: does anyone set the “shine” and “shadow” colors to things other than the default black and white? Would you miss them if they were gone?

These colors are used only in DiskProbe and Tracker in Haiku. They are also used in a few apps and libraries. However I think they could be replaced by use of tint_color to lighten or darken another color, which would make things easier to configure.

  • Remove them, they’re useless
  • Keep them, I need them

0 voters

If they were really used once for what they are named for, it could be fun to play with them. Since they are not, they are more confusing than useful.
I happened to play with shine once for one of my themes. It allows to get an interesting glowing effect on desktop texts which can improve readability in some cases but, honestly, it’s too difficult to obtain to be really worthy.
I’m for removing them from system constants though I’m not sure that a tint will always do it. Perhaps defining a colour at app level would be needed?

When It was introduced?

It is in Haiku since 2003, it was apparently added to match BeOS Dano/R6.

We have already removed various colors from Dano including B_MICHAELANGELO_FAVORITE_COLOR, B_RANDOM_COLOR, and a few more.


So what is Michelangelo’s favourite colour?


I use it to make desktop text more legible, but I can make do without it if there are better overall approaches to colouring elements of the UI.

Can you share the color values you use for the desktop color and the shine/shadow colors? This will help testing the new code to make sure things work reasonably. Thanks!

Hi - I tend to use it on backdrop images that have a lot of variability between light and dark tones across the image, where dark or light selected text color does not work well in all areas of the image. I then choose a glow that is opposite to the text brightness.
Variable brightness background use of Haiku Ui Shine Element

Ok, “opposite the text brightness” seems reasonable to me and something that can easily be automated, I’ll rewrite Tracker code in that way.

1 Like

At one point I was thinking thar introducing color blending to the shine, shade, half-shine and half-shade values of an Amiga program. Of course the chips weren’t modern enough to incorporate blending via the alpha channel so I ended up using greyscales from a fixed palette instead. Does Haiku’s user interface incorporate color blending as standard? I suspect that using white with 85% opacity would look better than pure white for shine. Likewise using black with 85% opacity would do likewise for shade. Half-shine and half-shade could be translated into 50% opacity white and 50% opacity black respectively.

It’s not clear what these colors are used for in the first place. In Tracker they are used for the “glow” under icon text on desktop, and I think that’s pretty much it. In this usage, the color alpha is modified (as you can see in the screenshot linked in the previous post)

Recently the constant was also used in DiskProbe to generate the color of the stripes in the hex view, but that would more easily be done by darkening/lightening the background color slightly.

This code should be rewritten, for one it makes no sense for tracker to have it’s own implementation for text shadows and for another this doesn’t produce legible text reliably.
Tracker currently just uses the bg color to determine which text color to use, but the bg is never visible when using images as background which is a bit the norm.

If the image has sections with high and low brightness the tracker text quickly becomes unreadable.

1 Like

If you are using an image smaller than your desktop and you’re not stretching it, the background colour can be visible. That’s the case with Haiku logo, for example.

This said, you’re right. The fact that the glow effect is not always visible depending of the background colour is confusing and the whole process to get desktop colours right is too complicated.
In the background app, I would rather see an option to add a label background for the desktop text. Also since not everyone like colours there, I guess that an option to enforce use of black & white (In fact, default Haiku theme colours) on Desktop would be welcomed. This would allow to drop the tricky calculation made depending of the background colour and would make things a lot easier to understand for users.