oh-my-posh theme colors not honored by Cmder/ConEmu

91 Views Asked by At

I'm struggling with a very weird color problem using Cmder (which is based off ConEmu) and oh-my-posh. When I pick an oh-my-posh theme, the colors are never what they are defined as in the theme. After much experimentation, I believe that the scheme chosen in the ConEmu settings "Choose color scheme" ALWAYS wins. What I mean by that is, if the oh-my-posh theme is a blue-ish color, but the scheme in ConEmu has no blues, it will pick the color that is closest to that blue. Another, example... if the oh-my-posh theme color is somewhat white, but the ConEmu theme is all dark plus one bright color, it will choose the bright color. Basically, every color used MUST be a color directly out of the ConEmu scheme chosen. None of the colors in the oh-my-posh theme are used, but they are "influencing" the color chosen in the ConEmu scheme. I honestly don't know how they are being mapped - maybe it's just a place-order thing.

I'm on Windows 11, and this is driving me crazy. I just want to be able to exactly define the color in my oh-my-posh theme and have it be honored in my console.

Anyone have any ideas what's going on?

UPDATE

In the meantime, I've figured out how to change the colors in the color schemes in ConEmu. I'll have to alter one to contain the exact colors of the theme I've chosen from oh-my-posh = serious pain, but it will work.

1

There are 1 best solutions below

1
Jan De Dobbeleer On

This should be possible by enabling 256 colours though. There's a section in the documentation about this. In short:

xterm 256 color mode requirements

  • Options must be turned on
    • TrueMod (24bit color) support on Colors page
    • ANSI and xterm sequences on Features page
    • Inject ConEmuHk on Features page (required for second level programs)
  • Turn off scrolling (extended attributes works only in the work area - the bottom of the console)
  • Cygwin and Msys applications do not pass ANSI to terminal. At all. More information here.