4

Context:

  • I am trying to set up Powerline on WSL
  • On my Windows Machine
  • Which I have set up to be the terminal in Intellij which is running on windows

The colors were displayed in a very odd way. I came across the question How to change the output color of echo in Linux which suggested the use of the following command to test the color outputs.

for code in {0..255}; do echo -e "\033[48;5;${code}m $code "; done | paste - - - - - - - -

Which gave the following result. Output

I had similar results when trying to make use of the WSL bash terminal. Edit: This only happens when in intellij. bash.exe and the ubuntu terminal do not have this issue.

What is the correct way to make use of 8-bit and/or 24-bit color in intellij/WSL?

Community
  • 1
  • 1
Locke
  • 7,626
  • 2
  • 21
  • 41
  • From my experimenting, it seems that the terminal thinks it is using 8-bit color, but Intellij is taking it's output and converting it back to the main ANSI colors which can be adjusted in the settings. – Locke Nov 28 '18 at 02:32
  • Am I got you right that running WSL on windows show proper colors, but when you set it as a terminal in IDE colors are wrong? – y.bedrov Nov 28 '18 at 10:52
  • Yes. When I set the terminal to "bash.exe" instead of "cmd.exe", the bash window shows up with limited colors as shown above, but if I open bash.exe outside of Intellij, it will have the full range of 8-bit color. – Locke Nov 28 '18 at 16:54

1 Answers1

0

As of Intellij Idea version 2021.3, the terminal now supports 24-bit color thanks to ConPTY support on Windows.

Locke
  • 7,626
  • 2
  • 21
  • 41