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

Error text in debug console is low contrast with some themes #3326

Closed
iulian0512 opened this issue May 7, 2021 · 5 comments
Closed

Error text in debug console is low contrast with some themes #3326

iulian0512 opened this issue May 7, 2021 · 5 comments
Labels
in debugger Relates to the debug adapter or process of launching a debug session is bug
Milestone

Comments

@iulian0512
Copy link

How can i change the color of the gray text
The relevant error-causing widget was
Scaffold-[LabeledGlobalKey<ScaffoldS .....

i tried in settings.json the following:
"debugConsole.infoForeground": 000000,
"debugConsole.errorForeground": 000000,
"debugConsole.warningForeground": ffee00"

does not wok for that piece of text

Screenshots
image

Versions (please complete the following information):

  • VS Code version:
    Version: 1.56.0 (user setup)
    Commit: cfa2e218100323074ac1948c885448fdf4de2a7f
    Date: 2021-05-04T22:09:06.405Z
    Electron: 12.0.4
    Chrome: 89.0.4389.114
    Node.js: 14.16.0
    V8: 8.9.255.24-electron.0
    OS: Windows_NT x64 10.0.19042

  • Dart extension version: v3.22.0

  • Dart/Flutter SDK version: 2.0.6

@DanTup DanTup added this to the v3.23.0 milestone May 7, 2021
@DanTup DanTup changed the title Debug console exception log color Error text in debug console is low contrast with some themes May 7, 2021
@DanTup DanTup added the in debugger Relates to the debug adapter or process of launching a debug session label May 7, 2021
@DanTup
Copy link
Member

DanTup commented May 10, 2021

@iulian0512 can you confirm which VS Code theme you're using (or if custom, can you provide the JSON/colour values)?

Thanks!

@iulian0512
Copy link
Author

iulian0512 commented May 11, 2021

@DanTup here is my complete theme
vscodeGrayIulian.jsonc.txt

@DanTup
Copy link
Member

DanTup commented May 17, 2021

Thanks! It looks like themes can set some of the ansi colours:

"terminal.ansiBlack": "#000000",
"terminal.ansiBlue": "#0000c0",
"terminal.ansiBrightGrey": "#ff0000",
"terminal.ansiBrightBlack": "#505050",
"terminal.ansiBrightBlue": "#2080f0",
"terminal.ansiBrightCyan": "#80f0f0",
"terminal.ansiBrightGreen": "#80f080",
"terminal.ansiBrightMagenta": "#f060f0",
"terminal.ansiBrightRed": "#f04040",
"terminal.ansiBrightWhite": "#ffffff",
"terminal.ansiBrightYellow": "#f0f060",
"terminal.ansiCyan": "#00b0b0",
"terminal.ansiGreen": "#008000",
"terminal.ansiMagenta": "#b000b0",
"terminal.ansiRed": "#c00000",
"terminal.ansiWhite": "#ffffe0",
"terminal.ansiYellow": "#808000",

We're currently using some grayscale values to try and dim text here, but those colours are not customisable and don't look great outside of fairly-dark or fairly-light backgrounds.

I'll see if I can find some alternatives in the customisable set, otherwise we might need to make this toggleable.

@DanTup DanTup closed this as completed in fb56df7 May 18, 2021
@DanTup
Copy link
Member

DanTup commented May 18, 2021

I've removed the. use of custom grey colours, and now write text as stderr where we want it red, and stdout otherwise. The only ansi code used is to fade the colour of stack frames that aren't part of your own code (which seems to work well for all themes).

Here's how it looks in Dark Theme:

Screenshot 2021-05-18 at 11 29 36

Light theme:

Screenshot 2021-05-18 at 11 29 47

Custom theme above (although I updated "debugConsole.errorForeground": "#990000" because it was originaly set to black and the error messages were less clear).

Screenshot 2021-05-18 at 11 29 55

This should work better for all themes now, and be more customisable since it doesn't use codes that aren't themable in VS Code.

@iulian0512
Copy link
Author

it looks wonderful thanks.

DanTup added a commit that referenced this issue May 19, 2021
DanTup added a commit that referenced this issue May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in debugger Relates to the debug adapter or process of launching a debug session is bug
Projects
None yet
Development

No branches or pull requests

2 participants