I use IPython on Windows Powershell. For some reason the color of string literals is unreadably dark red:
For comparison, here is how it looks on VSCode, using powershell "shell" and Ipython:
IPython certainly uses some commands to tell the shell the color to be used. How can I modify the string literal color to be lighter red? I would like this to be computer-wide (or at least user-wide) setting.
Here is what I did to make the text more readable. Thanks for SO users Theo and Christoph for pointing me to right direction.
~\.ipython
~
translated into C:\Users\<USER>\
.ipython profile create
PS C:\Somefolder> ipython profile create
[ProfileCreate] Generating default config file: 'C:\\Users\\<USER>\\.ipython\\profile_default\\ipython_config.py'
ipython_config.py
#c.TerminalInteractiveShell.highlighting_style_overrides = {}
into
from pygments.token import Token
c.TerminalInteractiveShell.highlighting_style_overrides = {Token.String: '#ff0000'}
Token.Comment
Token.Error
Token.Escape
Token.Generic
Token.Keyword
Token.Literal
Token.Name
Token.Number
Token.Operator
Token.Other
Token.OutPrompt
Token.OutPromptNum
Token.Prompt
Token.PromptNum
Token.Punctuation
Token.String
Token.Text
Token.Token
From left to right in the figure (with my own naming)
- Black #000000
- Middle blue #000080
- Green #008000
- Teal #008080
- Dark red #800000
- Dark blue #012456
- Light grey #eeedf0
- Grey #c0c0c0
- Dark grey #808080
- Bright blue #0000ff
- Bright light green #00ff00
- Bright light teal #00ffff
- Bright red #ff0000
- Pink #ff00ff
- Yellow #ffff00
- White #ffffff
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With