vscode-didact icon indicating copy to clipboard operation
vscode-didact copied to clipboard

Provide a way to configure the color theme

Open abkieling opened this issue 4 years ago • 3 comments

Provide a new settings property for color theme that accepts one of the following values:

  • auto (default)
  • dark
  • light

abkieling avatar Jun 26 '20 20:06 abkieling

@akieling as far as colors go, this is kind of tough, but I'm hoping I can glean a bit more of what you're after.

Right now we have a stylesheet (https://github.com/redhat-developer/vscode-didact/blob/master/media/webviewslim.css) that takes colors from the active theme.

We use these color settings from the current theme:

--vscode-editor-background --vscode-editor-foreground --vscode-editor-selectionForeground --vscode-editor-selectionHighlightBackground --vscode-textlink-foreground

And we use them in various places to try and show tables, syntax higlighting, and other bits and pieces so that they are readable from whatever theme the user has currently selected. (File->Preferences->Color Theme)

What colors do you think we should use for those? Can we take colors from PatternFly? (https://www.patternfly.org/v4/design-guidelines/styles/colors)

If we have a set of colors, I think we can structure things a little differently in those stylesheets to do what you propose with theme-based, dark, and light settings -- but I worry that by overriding the colors in the overall VS Code theme we may be doing more harm than good.

I'll ask around and see if anybody has any ideas on how to do this well.

bfitzpat avatar Jul 02 '20 18:07 bfitzpat

I think it should continue using the vscode colors, but the dark and light modes would use color values instead of the color variables you listed above.

abkieling avatar Jul 02 '20 19:07 abkieling

Comment I got from the VS Code developer's slack -

At the moment, the best you can do is use colours as they are defined in themes, so you can use the same colour for something, but you can’t get the actual colour definition, which is quite annoying.

We may be able to grab the colors from the in-memory stylesheet and just work around it. Will play more.

bfitzpat avatar Jul 02 '20 19:07 bfitzpat