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

Inline code block outline is too dark on light background #734

Closed
nyanpasu64 opened this issue Jun 25, 2020 · 10 comments · Fixed by #897
Closed

Inline code block outline is too dark on light background #734

nyanpasu64 opened this issue Jun 25, 2020 · 10 comments · Fixed by #897
Assignees
Labels
Area: Editor theming Decorations and highlighting in editor. Issue: Enhancement Improvements in existing features. Res: Fixed Fix is checked in, but it might be a few weeks until a release.

Comments

@nyanpasu64
Copy link

What is the problem?

If "Syntax: Decorations" are enabled, and you pick a light theme, then inline code blocks have too dark of an outline around them.

How can I reproduce it?

  • Set "markdown.extension.syntax.decorations": true.
  • Set "workbench.colorTheme": "Default Light+" (switch to light editor color theme).

Screenshot:

vscode-markdown code blocks

@yzhang-gh
Copy link
Owner

Thanks for the feedback. The color was picked based on a dark theme I was using, although I switched to a light one recently.

We now have the API to know the theme kind (microsoft/vscode#32813 (comment)) but picking a proper color is still challenging as there are many different themes.

@yzhang-gh yzhang-gh added Issue: Enhancement Improvements in existing features. Help wanted Looking for help. labels Jun 25, 2020
@nyanpasu64
Copy link
Author

Does vscode's extension or theme engine let you pick the color by blending 10-20% of the foreground color into the background color (linearly interpolating between them) in linear or sRGB-gamma color space?

@yzhang-gh
Copy link
Owner

That's a good idea, although we cannot access the theme color yet.

@yzhang-gh yzhang-gh added the Area: Editor theming Decorations and highlighting in editor. label Jul 23, 2020
@Lemmingh
Copy link
Collaborator

Lemmingh commented Nov 7, 2020

I don't think we really need the actual color value. Color reference sounds enough in this case.

What about editor.selectionBackground?

@yzhang-gh
Copy link
Owner

I roughly know that VS Code now provides ThemeColor APIs? As for which color to use, we can play around with it and then decide.

@Lemmingh
Copy link
Collaborator

Lemmingh commented Nov 7, 2020

VS Code now provides ThemeColor APIs?

Emmm ... No. The ThemeColor class has NOT been changed. It still only acts as a reference to workbench color, and the VS Code team seems unwilling to expose the actual value inside.


play around

I only tested selection colors and word highlight colors with the built-in Light, Dark, and Monokai themes, and the following looked good to me:

  • editor.selectionBackground
  • editor.wordHighlightStrongBackground

Thinking selectionBackground is usually brighter, I suggested it.

I'm on VS Code 1.51.0, on Windows, with a calibrated 100% sRGB display.

@yzhang-gh
Copy link
Owner

👍

@Lemmingh
Copy link
Collaborator

@yzhang-gh
Copy link
Owner

Nice work!

Just to add a few screenshots

GitHub Light
image

GitHub Dark
image

Actually, I don't have a strong preference on the colors. So looks good to me.

@Lemmingh
Copy link
Collaborator

If nothing is wrong, I will push to master at 2020-11-15T12:00Z.

@Lemmingh Lemmingh self-assigned this Nov 10, 2020
@Lemmingh Lemmingh added Res: Fixed Fix is checked in, but it might be a few weeks until a release. and removed Help wanted Looking for help. labels Nov 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Editor theming Decorations and highlighting in editor. Issue: Enhancement Improvements in existing features. Res: Fixed Fix is checked in, but it might be a few weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants