Closed rodrigogiraoserrao closed 2 years ago
So it looks like WSL only supports 256 colors. Some themes use full RGB colors, and they may not look quite as intended, but generally "good enough".
The puzzling one is the dracula theme on the left. That's clearly the "default" theme. Do you perhaps have an older version of pygments? If you update pygments, does anything change?
That was it. I had pygments
2.8.1, and python -m pip install pygments --upgrade
updated it to 2.11.2.
Now, all themes seem to be working fine.
Was this my fault, or "should" rich-cli pin a higher version of pygments
?
Was this my fault, or "should" rich-cli pin a higher version of pygments?
Maybe it should. But that increases the odds of a version conflict.
If you install it via pipx you get a unique environment and you'll get the latest pygments.
I think I might wait until there are a few more installation methods before I decide. At least now if anyone is missing Dracula, I'll know what to tell them.
Maybe it should. But that increases the odds of a version conflict.
Understood. As far as I'm concerned, this issue can be closed. Thanks.
Some
--theme
s are not working on my Windows Terminal (using Windows 11) although they seem to work on WSL on the same machine.Some of the themes not working include
gruvbox-light
,dracula
, andfriendly_grayscale
(all taken from thepygments
documentation here).Below you can find a screenshot showing the Windows terminal on the left and WSL on the right, both running
rich-cli 1.3.0
:rich
without specifying a theme;rich
with--theme dracula
and the Windows terminal renders it with the same styling as if I had invented a random theme name;rich
with another theme that both terminals seem to recognise, although the colours don't match 100% (which is fine).Running
python -m rich.palette
gives this output: