Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better default colours #1293

Open
dimaqq opened this issue Dec 29, 2015 · 17 comments
Open

Better default colours #1293

dimaqq opened this issue Dec 29, 2015 · 17 comments
Labels
topic: reporting related to terminal output and user-facing messages and errors type: enhancement new feature or API change, should be merged into features branch

Comments

@dimaqq
Copy link

dimaqq commented Dec 29, 2015

One of the default colours, yellow, is very hard to read on white background.

my $TERM is xterm-256color

pytest-colors

@The-Compiler
Copy link
Member

@esiegerman what do you think about this?

@RonnyPfannschmidt
Copy link
Member

That item is for after independence from py.io.terminalwriter

@The-Compiler
Copy link
Member

@RonnyPfannschmidt huh - the choice of what color to use is independent from terminalwriter, no?

@dimaqq
Copy link
Author

dimaqq commented Dec 29, 2015

Btw, here's hexdump -C for these colors:

000001a0  20 2e 2e 2e 2e 2e 2e 2e  0a 0a 1b 5b 31 6d 1b 5b  | ..........[1m.[|
000001b0  33 33 6d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |33m=============|
000001c0  3d 3d 3d 3d 20 37 20 70  61 73 73 65 64 2c 20 31  |==== 7 passed, 1|
000001d0  20 70 79 74 65 73 74 2d  77 61 72 6e 69 6e 67 73  | pytest-warnings|
000001e0  20 69 6e 20 30 2e 32 30  20 73 65 63 6f 6e 64 73  | in 0.20 seconds|
000001f0  20 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  | ===============|
00000200  3d 3d 3d 1b 5b 30 6d 0a                           |===.[0m.|
00000208

@RonnyPfannschmidt
Copy link
Member

@The-Compiler the current API is very limiting

@sharan-cs2000
Copy link

use --color=no option...

image

@nicoddemus nicoddemus added type: enhancement new feature or API change, should be merged into features branch topic: reporting related to terminal output and user-facing messages and errors labels May 22, 2018
@nicoddemus
Copy link
Member

Hi everyone.

What's the proposed solution for this case? Just changing the pure yellow to something else, or something more advanced like "themes" support, or something else?

@RonnyPfannschmidt
Copy link
Member

@nicoddemus i did a query to twitter - i'D like to employ a library to get the colors from that match the users terminal colors

themes is definitively not an option

@nicoddemus
Copy link
Member

i did a query to twitter - i'D like to employ a library to get the colors from that match the users terminal colors

Sounds good. Should we update this issue's title with that proposal, or create a new one?

themes is definitively not an option

Oh I didn't like that idea as well, just throwing it out there to see where it landed.

@gnikonorov
Copy link
Member

Can I propose tracking this in this issue instead?

I think that the proposal the issue poster made in #6984 (comment) would solve this issue

@nicoddemus @RonnyPfannschmidt

@RonnyPfannschmidt
Copy link
Member

IMHO it's the other way around

@rakyi
Copy link

rakyi commented Oct 7, 2020

Some of the colors have too low contrast with the background of my terminal theme:

image

I think it might be caused by the fact that here we assume a dark background, while my background is light:

source, PythonLexer(), TerminalFormatter(bg="dark")

@rakyi
Copy link

rakyi commented Oct 7, 2020

After a bit more investigation I found out that my theme (base-16-default-light) uses bright color slots to store additional colors. Instead of what would normally be bright green this light grey is used. So not really an issue with TerminalFormatter I guess.

@gzagatti
Copy link

gzagatti commented May 9, 2023

I'm having the same issue as @rakyi, my terminal background is light so it's difficult to read some of the output.

See below for an example:

image

Would it be possible to have an option for light backgrounds? Or make use of an env variable like LS_COLORS to print with readable contrasts?

@RonnyPfannschmidt
Copy link
Member

I'd love to see us migrate to rich there

Im starting to get the impression that vendoring it may be OK

@RonnyPfannschmidt
Copy link
Member

im pretty torn between having it a recommended to use extra and depending on it by default, but its like 1-2 years away before i can focus on that myself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: reporting related to terminal output and user-facing messages and errors type: enhancement new feature or API change, should be merged into features branch
Projects
None yet
Development

No branches or pull requests

9 participants