seachicken/gh-poi

Text is invisible on light terminal themes

monodera opened this issue · 4 comments

Describe the bug

When I run gh poi, the text colors of terminal outputs are invisible for some messages for light terminal background colors. I'm not sure if this is because of my setting of the terminal or login shell (or maybe gh itself), but I'd like to know if there is a way to control the text colors of the output messages.

Here are a couple of examples:

With Ayu Mirage theme:

Screenshot 2024-04-26 at 10 56 49

With ayu_light theme:

Screenshot 2024-04-26 at 11 05 14

Your Environment

  • OS: macOS 14.4.1
  • gh (Check with gh --version): 2.47.0 and 2.48.0
  • gh-poi (Check with gh ext ls): v0.9.8
  • Terminal: iTerm2 3.4.23

Thank you for you're reporting!
I had a similar issue before and it was fixed. #112
gh poi is currently used by fatih/color for text colors, I think it's a problem with how to use this library, so I think it can be fixed.

main branch colors printing is here:

gh-poi/main.go

Line 199 in 920a5e6

fmt.Fprintf(color.Output, " %s", white(branch.Name))

I would like to check if there is a problem only with the white function. Could you also check the results of gh poi --help?

yes, I still have the issue with gh poi --help.

Screenshot 2024-05-02 at 20 08 44

However, the text is visible (still a bit low contrast) on Warp terminal with Ayu Light theme
Screenshot 2024-05-02 at 22 02 49

I haven't checked whether any difference exists in the color configurations, but it may be related to the theme configuration of my iTerm2.

@monodera Thanks for reporting it, I was able to fix it. Please run gh ext upgrade poi.

It worked! Thanks for quickly fixing it.