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

Inaccurate Colors in ConEmu with oh my posh themes #2438

Open arunbhardwaj opened 2 years ago

arunbhardwaj commented 2 years ago

Versions

ConEmu build: 220418 x64 OS version: Windows 11 Pro x64 version 21H2 build 22000.613 (but I've also reproduced this bug on a separate machine running Windows 10 Pro version 21H1 build 19043.1586) Used shell version: git-bash

Problem description

Using ConEmu with oh-my-posh themes results in inaccurate colors. I've tested this with the default themes packaged with oh my posh as well as my own customized theme (see attached gist). My theme when loaded in both the powershell terminal and git bash terminal displays the correct colors. However, when loaded into ConEmu powershell & git-bash, the colors are no longer accurate. I've searched through the open issues and docs for both oh-my-posh and ConEmu. I believe this to be a bug with ConEmu as:

The color differences are most easily noticed when looking at the leftmost side of the shell prompts. There is no orange color in ConEmu after oh-my-posh is running. They somehow get converted to shades of red.

Steps to reproduce

  1. Install latest ConEmu x64
  2. Install oh my posh
  3. Import the attached ConEmu settings
  4. Download the attached oh-my-posh theme
  5. Run eval "$(oh-my-posh init bash --config ~/path/to/myposhtheme.json)" within git-bash shell in ConEmu
  6. Notice the color on the left hand side of the prompt

Actual color

hex: f40e17

Expected color

hex: edc809

Additional files

ConEmu Settings & myposhtheme,

Screenshots: ConEmu after oh my posh Inaccurate colors in ConEmu after ohmyposh ConEmu before oh my posh Accurate colors in ConEmu before oh my posh

Powershell Accurate Colors Accurate colors in powershell Git-bash Accurate Colors accurate colors in git bash

supra107 commented 1 year ago

It seems that ConEmu approximates the colors set by Oh My Posh to the ones declared in ConEmu's color palette. Here's ConEmu's CMD prompt compared to Microsoft Terminal's CMD prompt, where MS Terminal uses the colors defined by Oh My Posh. Both ConEmu and Microsoft Terminal use the same color palette. image

thecouchcoder commented 1 week ago

@arunbhardwaj did you find a fix for this? I'm experiencing the same thing

arunbhardwaj commented 6 days ago

@thecouchcoder sadly, I never did. I tried to see how ConEmu was importing/using colors, but as C++ is not my forte, it just wasn't worth the time investment. I had swapped to Cmder which still uses ConEmu under the hood, but it also had color issues and became similarly buggy. Now, I just use Windows Terminal.