ur0 / lolcat

lolcat, now with fearless concurrency.
MIT License
99 stars 14 forks source link

Remove setting background color without a color #11

Closed Arrowbox closed 4 years ago

Arrowbox commented 4 years ago

The line print!("\x1b[38;2;{};{};{};48m{}\x1b[0m", fg.0, fg.1, fg.2, c); includes 48m. From wikipedia the 48 code needs to be followed by either ;5;n where n is a color code or ;2;r;g;b with rgb values as you have done in colored_print_with_background. It looks like a trailing 48m just results in a black background by default in at least KDE's Konsole terminal. This PR just removes the trailing 48.

ur0 commented 4 years ago

Thanks for the PR, LGTM.