KristofferC / Crayons.jl

Colored and styled strings for terminals.
Other
150 stars 14 forks source link

Manual option for a Solarized-Dark-Fix #68

Closed fbruetting closed 1 month ago

fbruetting commented 11 months ago

The Solarized Dark color scheme is very popular because of it’s eye-friendlyness – but sadly it violates the terminal color specification, because some bright color variants contain very dark tones and the grey tones being too near to the background color tone. This is due to Solarized’s color logic which doesn’t align well with the terminal color palette definition.

Here’s it’s color palette (in German, but I’m sure you get it): Bildschirmfoto vom 2023-11-13 17-38-42

This leads to text parts in Julia not being readable, especially visible in stack traces, see the difference here:

Bildschirmfoto vom 2023-11-13 17-43-50 Bildschirmfoto vom 2023-11-13 17-43-44

There’s a big Julia thread here https://github.com/JuliaLang/julia/issues/38730, and we already discussed to quite some extent in the DataFrames issue https://github.com/JuliaData/DataFrames.jl/issues/3400.

The best solution seems to let Solarized be broken, because e.g. hard-coding that color would negatively impact all other themes. But because of Solarized’s enormous popularity, it would be nice if we could have a handy manual solution – e.g. being able to define an ENV or execute a config function to alter that color tone. And as it affects whole Julia, it seems to be best implemented in Crayons.

So: Is it possible to implement something like an ENV SOLARIZED_DARK_FIX[=<COLOR>] which alters that color to a predefined color (terminal colors 242-246 are quite usable, see https://github.com/JuliaData/DataFrames.jl/issues/3400)? Best if a custom color could optionally be specified.

tecosaur commented 1 month ago

This should be fixed by https://github.com/JuliaLang/julia/pull/51816, if/when it gets merged.

KristofferC commented 1 month ago

I don't think this issue has anything to do with this package really. It isn't used in Base.