[BUG] Coloring does not work in PyCharm
See original GitHub issueJust checked - it seems to be a PyCharm problem, I will report it there, so this report is just FYI for rich users who use PyCharm. It works in the PyCharm terminal (command line), but not inside the stdout pane of PyCharm.
Reproduction Replace print() statement with console.print(string, style=‘bold red’). The string is printed, but no coloring.
from rich.console import Console
console = Console()
console.print('==> Mismatches were found in one or more platforms <==', style='bold red')
Windows 10, PyCharm Community (lastest), Python 3.8, Rich 5.0.0
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:17
Top Results From Across the Web
[BUG] Coloring does not work in PyCharm · Issue #206 - GitHub
It works in the PyCharm terminal (command line), but not inside the stdout pane of PyCharm. Replace print() statement with console.
Read more >Color scheme bug - IDEs Support (IntelliJ Platform) | JetBrains
Hello,. I would like to report a weird coloring behavior that I had for a while. I tried to reset to default theme...
Read more >PyCharm UI does not display colors according to set values ...
However, when I open the a color picker to test the values on the swatch as well as the background color of the...
Read more >Todo highlighting not working [PyCharm 2018.3.4 (Pro) #PY ...
Now i came back, updated the IDE and the highlighting of todo-items does not work properly anymore(neither builtin nor custom ones). The ...
Read more >Colorama coloring doen't show up in console : PY-16927
When run python script using External tool on PyCharm, 'PYCHARM_HOSTED' environment value is not set. So we have to manually set the env...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not without breaking things for other users.
Interesting. That suggest the stdout window is not an embedded console. Rich will disable color if it detects it is not connected to a real terminal.
You could try this:
That will force Rich to write color, but if PyCharm can’t handle it, you may end up with garbage.