yannjor / krabby

Print pokemon sprites in your terminal
GNU General Public License v3.0
97 stars 3 forks source link

Terminal color changes to black #14

Closed kushagra-xo closed 10 months ago

kushagra-xo commented 11 months ago

Screenshot_20231008_014434

OS: Arch Linux DE: Plasma Terminal: Konsole Shell: bash Install Source : AUR Krabby Version: 0.1.7

kushagra-xo commented 11 months ago

i have personally switched over to fish shell and i cannot reproduce it, and is henceforth not relevant to me anymore.

yannjor commented 11 months ago

interesting, seems to only happen on bash :thinking:

unit537 commented 10 months ago

Confirming this affects bash. I took a cursory look over the repo and I believe the issue is with the individual colorscripts files, specifically the last ANSI escape code in each file.

The Inkay, Honchkrow, and Whirlipede files end with "[0m", which is the code for reset/no color, but most of the colorsprite files end with the last ANSI escape code needed to color the last 'pixel' in the sprite, which seems to almost always be black for the border around the sprite.

I can confirm that Inkay, Honchkrow, and Whirlipede always leave my terminal foreground color intact. For getting random sprites, running krabby random; echo -e '\033[0m' always results in the foreground color being reset correctly. A quick fix might be appending "[0m" to the string you;re getting from the colorsprites files.

Arch/Kitty/Bash, installed from AUR, Version 0.1.7