On Tuesday, 19 June 2018 at 19:22:09 UTC, Jacob Carlborg wrote:
On 2018-06-09 00:45, gdelazzari wrote:
Actually, I was thinking about that too. In fact, what if a
user is
using a "classic" dark-background theme on macOS's terminal?
Or another
terminal which by default uses a dark background, like the one
mentioned
above? He would get all the colors and the text contrast
messed up if I
put a different color scheme for macOS only. The only valid
option would
be to check the background color of the terminal, but I don't
think
that's possible at all in a standardized way, unless someone
can prove
me wrong. That would be cool.
As I mentioned, I think the only way to do this is to avoid
using white and black colors and assume all other colors (at
least the standard ones) work with the selected theme. For
regular text, reset to the default foreground color instead of
explicitly using black or white.
Not just black and white but also some shades of grey. Recently I
fixed the same problem in the vibe.d's logger
(https://github.com/vibe-d/vibe-core/pull/82) and all I can say
is that the only way to deal with colours is to test it on both
black and white background.