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

Font colors in error messages are bad in some terminals #66

Open
MrPowers opened this issue Aug 9, 2023 · 1 comment · May be fixed by #68
Open

Font colors in error messages are bad in some terminals #66

MrPowers opened this issue Aug 9, 2023 · 1 comment · May be fixed by #68

Comments

@MrPowers
Copy link
Owner

MrPowers commented Aug 9, 2023

Screenshot 2023-08-09 at 10 25 06 AM

The white color font to underline cell differences isn't great in my terminal for example. It'd be totally unreadable in a terminal with a white background.

We should try to make two improvements:

  • Use default terminal colors for the given users (if that's possible), so it looks good in their terminal
  • Let users customize the colors
@calum-mcg
Copy link
Contributor

calum-mcg commented Aug 9, 2023

Determining default terminal colours is difficult and impossible in some cases. We could try to guess, but for the sake of simplicity it might be easier to do the following:

  • Change white to a colour that works with most common background colours by default (green?)
  • Add option to change colour scheme of the table, an optional dict perhaps e.g.:
colour_scheme = {
   default:'red',
   matched:'blue',
   underlined:'green'    
}
assert_df_equality(df1, df2, underline_cells=True, colour_scheme=colour_scheme)

We would need to add a validation step for the colour scheme dict.

@calum-mcg calum-mcg linked a pull request Aug 14, 2023 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants