Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different color is displayed when the Cursor color is white in Ubuntu-ColorScheme. #17223

Closed
jkim439 opened this issue May 9, 2024 · 4 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-By-Design It's supposed to be this way. Sometimes for compatibility reasons.

Comments

@jkim439
Copy link

jkim439 commented May 9, 2024

Windows Terminal version

1.19.10821.0(Stable), 1.21.1272.0(Preview)

Windows build number

10.0.22631.0

Other Software

No response

Steps to reproduce

I always use Ubuntu-ColorScheme color profile in Ubuntu 22.04.4 LTS. It's not accurate, but a few months ago, there was a problem where the cursor color was displayed as very bright green(#CFF5DB) instead of white(#FFFFFF).
1
2

Cursor color is #FFFFFF, but I can see another color that is #CFF5DB. All colors except #FFFFFF are reflected normally, but only #FFFFFF is output as #CFF5DB.
3

Expected Behavior

Cursor color should be white(#FFFFFF).

Actual Behavior

Cursor color is very bright green(#CFF5DB).

@jkim439 jkim439 added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels May 9, 2024
@zadjii-msft
Copy link
Member

Could you share your settings.json file/?


for my own reference:

@rem 18.04
sudo type "c:\Program Files\WindowsApps\CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2020.827.0_x64__79rhkp1fndgsc\Terminal\Fragments\terminal.json"

@rem 22.04
sudo type "c:\Program Files\WindowsApps\CanonicalGroupLimited.Ubuntu22.04LTS_2204.3.63.0_x64__79rhkp1fndgsc\Terminal\Fragments\terminal.json"
``

```jsonc
{
    "profiles": [
      {
        "updates": "{17bf3de4-5353-5709-bcf9-835bd952a95e}",
        // We have to hide this autogenerated profile as we can't change the name of existing profiles.
        // This would use WSLID like "Ubuntu-20.04" which is hard to read.
        "hidden": true
      },
      {
        "name": "Ubuntu 22.04.3 LTS",
        "colorScheme": "Ubuntu-22.04-ColorScheme",
        "commandline": "ubuntu2204.exe",
        "tabTitle": "Ubuntu 22.04.3 LTS",
        // This would be the idea once https://github.com/microsoft/terminal/issues/10359 is fixed.
        // "icon": "ms-appx:///Assets/Square44x44Logo.targetsize-32.png",
        "icon": "https://assets.ubuntu.com/v1/49a1a858-favicon-32x32.png",
        "cursorShape": "filledBox",
        "font": {
          // Not possible right now as we have multiple appx which could ship it and needs a store
          // permission: https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/desktop-to-uwp-extensions#share-fonts-with-other-windows-applications
          // Also, referencing it if it does not exist will show an error message when opening
          // the profile.
          //"face": "Ubuntu Mono",
          "face": "Cascadia Mono",
          "size": 13
        }
      }
    ],
    "schemes": [
      {
        "name": "Ubuntu-22.04-ColorScheme",

        "background": "#300A24",
        "black": "#171421",
        "blue": "#0037DA",
        "brightBlack": "#767676",
        "brightBlue": "#08458F",
        "brightCyan": "#2C9FB3",
        "brightGreen": "#26A269",
        "brightPurple": "#A347BA",
        "brightRed": "#C01C28",
        "brightWhite": "#F2F2F2",
        "brightYellow": "#A2734C",
        "cursorColor": "#FFFFFF",
        "cyan": "#3A96DD",
        "foreground": "#FFFFFF",
        "green": "#26A269",
        "purple": "#881798",
        "red": "#C21A23",
        "selectionBackground": "#FFFFFF",
        "white": "#CCCCCC",
        "yellow": "#A2734C"
      }
    ]
  }

There's no second cursor color in the profile, so that rules that out

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label May 9, 2024
@lhecker
Copy link
Member

lhecker commented May 9, 2024

When the cursor color is #ffffff we treat it as a "inverted color" cursor. It's basically a hack that has existed for a quite a while now. We need a profile setting that says "I want inverted/reversed/colored cursors" and it would default to inverted.

@jkim439
Copy link
Author

jkim439 commented May 10, 2024

Only "#FFFFFF" will be displayed "#CFF5DB".

This is my settings.json.
settings.json

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels May 10, 2024
@zadjii-msft
Copy link
Member

op yea forgot about cursor inverting. That explains it. I suppose then that this is sorta like #7118 - we need an explicit setting to control whether to invert the cursor or not.

For now, you can just set the cursorColor to #fffffe, and that should be white enough 😉

@zadjii-msft zadjii-msft closed this as not planned Won't fix, can't repro, duplicate, stale May 10, 2024
@zadjii-msft zadjii-msft added the Resolution-By-Design It's supposed to be this way. Sometimes for compatibility reasons. label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Resolution-By-Design It's supposed to be this way. Sometimes for compatibility reasons.
Projects
None yet
Development

No branches or pull requests

3 participants