Maximus5 / ConEmu

Customizable Windows terminal with tabs, splits, quake-style, hotkeys and more
https://conemu.github.io/
BSD 3-Clause "New" or "Revised" License
8.5k stars 570 forks source link

colors of external application are misinterpreted #2516

Open muellerto opened 1 year ago

muellerto commented 1 year ago

Versions

ConEmu build: 221218 stable x64 OS version: Windows 11 Pro x64 Used shell version: cmd.exe

Problem description

Many command line applications (MinGW ls, lsd, ncdu, ntop, nano, vim, lf, clifm) use own colors. ConEmu shows colors but merges it's own color scheme with these colors from the running application. This leads to unexpected results.

Steps to reproduce

  1. Start ConEmu.
  2. Start an external command line application showing colors in the ConEmu window, for instance the ls command from MinGW (ls --color -alF).
  3. Open the ConEmu Settings dialog and cycle through different color schemes, watch the ConEmu window in the background.

The shown colors change with every color scheme. This is problematic. Not only that the colors change, it's also a matter of fact that original colors which have very small differences are somehow rounded to the same resulting color. This means: when the application used indeed 10 distinguishable original colors ConEmu shows only 7, the other ones are rounded each to one of the seven.

Actual results

The following picture shows clifm in the original DOS box of Windows 11: dos Pay attention on the timestamp column. The timestamp column shows 4 different colors. The files 17, 18 and 27 have a middle grey tone. The file number 21 has another middle grey.

This is the same clifm in the same clifm color scheme but in a ConEmu window having the "Default Windows Scheme": conemu

It gets even more interesting. This is the same in "Cobalt2" scheme: conemu2 File number 21 which should have a middle grey tone in the timestamp column is here the brightest, the eye catcher. This is really wrong.

Expected results

I would like to have at last similar results because the external app has a reason (or a concept) for coloring things. And I would like to get this without configuring half a day.

What I ask myself is if it wouldn't be possible to have no color scheme at all in a ConEmu window. This should then include no interpretation of colors from an external application at all. (OK, this would require to know which colors the original DOS window uses.) ConEmu should then allow to define just a background color, all foreground colors should then come from the application.

What I'm not sure about is: do the colors in the original DOS box depend on color settings in Windows?

muellerto commented 1 year ago

Does anybody read this???

Maximus5 commented 1 year ago

Do you use connector? https://conemu.github.io/en/CygwinMsysConnector.html

There are requirements to show extended colors in conemu https://conemu.github.io/en/Xterm256Colors.html

muellerto commented 1 year ago

Never used the connector. Checked this now. It's something else than the original ConEmu window but does also not show the colors as expected. Indeed the colors of these both windows are very similar.

I read the texts behind the other link which was interesting. I checked also my settings according to this, didn't help.

But somehow it must work. I found others, Tabby (this is an Electron based terminal emulator), and also the new Windows Terminal (part of Windows 11). Both support own color schemes but show application colors as I would expect it and even out of the box. (Both have other disadvantages ... that's why I'm still interested in ConEmu.)