sdispater / pastel

Bring colors to your terminal
MIT License
51 stars 11 forks source link

Default error style is hard to read with solarized theme #1

Open blueyed opened 6 years ago

blueyed commented 6 years ago

The default error style is rather hard to read for me (using a solarized terminal theme):

2018-04-22-211738_971x64_escrotum

It becomes better when using "bold":

2018-04-22-211820_1096x45_escrotum

The color palette (non-bold white is rather greyish):

2018-04-22-212036_614x268_escrotum

It also looks bad with the light solarized variant: 2018-04-22-212124_959x53_escrotum

I suggest changing the default to be just bold red (fg).

Came here via cleo, which uses this (with additional empty lines around it to create a box): 2018-04-22-212354_730x196_escrotum

Changing the default itself might require changes downstream though, as can be seen with poetry's error (which uses bg=red inline): 2018-04-22-213115_629x174_escrotum

So regarding this it seems to be better to change the default to fg=red only, and then poetry would use bold or another option to highlight the destination.

However, "<fg=red>Something <options=bold>filename</> else.</> does not work as I would expect it: filename is not red, i.e. options are not added, but reset when nested?!

sdispater commented 6 years ago

Thanks for taking the time to write a detailed issue.

However, I won't change the style, unfortunately for you.

The thing is, if I put it in bold white it might not suit someone with another color theme that would define bold white to something not white. So, pastel can't support the thousands of color themes out there.

Regarding the formatting of errors, I won't change it since I like it this way: the error is isolated from the rest so easier to notice at a glance and having the type of the error separated from the error message is cleaner in my opinion.

blueyed commented 6 years ago

Uhm, that's a bummer. I wasn't suggesting to use bold white on red, but rather just (bold) red on default bg - that would be the most portable, and certainly makes sense for a library.

You could then still use a more "fancy" style in poetry itself.

As for poetry's error boxes: even when they are readable they take a lot of unnecessary space IMHO.