JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer
https://ohmyposh.dev
MIT License
17.01k stars 2.37k forks source link

Diamond rendering with different color #2017

Closed germancardenasm closed 2 years ago

germancardenasm commented 2 years ago

Code of Conduct

What happened?

Hi: In PowerShell in my vscode the Diamonds are rendering in a different color. I have tried using different themes but when diamonds are used it is rendering in different styles

Expected: image

Actual result: image

Expected: image

Actual result: image

Theme

{
  "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
  "blocks": [
    {
      "alignment": "left",
      "segments": [
        {
          "background": "#18354c",
          "foreground": "#ffc107",
          "leading_diamond": "\ue0b6",
          "properties": {
            "style": "folder"
          },
          "style": "diamond",
          "template": " \ue5ff {{ .Path }} ",
          "trailing_diamond": "\ue0b0",
          "type": "path"
        },
        {
          "background": "#18354c",
          "foreground": "#ffc107",
          "powerline_symbol": "\ue0b0",
          "properties": {
            "fetch_stash_count": true,
            "fetch_upstream_icon": true,
            "fetch_status": true
          },
          "style": "powerline",
          "template": " {{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \uf692 {{ .StashCount }}{{ end }} ",
          "type": "git"
        },
        {
          "background": "#ffc107",
          "foreground": "#18354c",
          "powerline_symbol": "\ue0b0",
          "style": "powerline",
          "template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }} ",
          "type": "python"
        },
        {
          "background": "#ffc107",
          "foreground": "#18354c",
          "powerline_symbol": "\ue0b0",
          "style": "powerline",
          "template": " \uf0e7 ",
          "type": "root"
        }
      ],
      "type": "prompt"
    }
  ],
  "final_space": true,
  "version": 2
}

What OS are you seeing the problem on?

Windows

Which shell are you using?

powershell

Log output

Does not give any results
JanDeDobbeleer commented 2 years ago

@germancardenasm I noticed this too yesterday, BUT other terminals display things correctly so it's a bug on the vscode terminal. Can you create an issue there?

JanDeDobbeleer commented 2 years ago

@germancardenasm see this issue. This is the fix:

"terminal.integrated.minimumContrastRatio": 1
germancardenasm commented 2 years ago

Hey, @JanDeDobbeleer, thank you very much; I appreciated that you spent the time digging into this.

Mellbourn commented 8 months ago

I have this issue, but in "reverse": The prompt looks great in the VSCode integrated terminal, but in the Windows Terminal, the diamonds are the wrong hue.

Is there a workaround for Windows Terminal too?

Mellbourn commented 8 months ago

To answer my own question: The corresponding setting in Windows Terminal is Automatically adjust lightness of indistinguishable text under Appearance setting this to Only for colors in the color scheme or Never fixed my issue.

The underlying setting in settings.json for Windows Terminal is

 "adjustIndistinguishableColors": "indexed",

or

 "adjustIndistinguishableColors": "never",
github-actions[bot] commented 4 months ago

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.