VSCode: Need a light mode
Some of us are used to using VSCode in a light mode. Perhaps a light-based bioSyntax theme can be made too?
Since we are going to be using JS, we can probably invert the lightness (but not the hue and chroma) dynamically to make a color suitable for light mode:
import {
useMode,
modeOklab,
formatHex,
toGamut,
parseHex
} from 'culori';
const oklab = useMode(modeOklab);
const rgb = toGamut('rgb');
function hexify(x) {
return formatHex(rgb(x))
}
function invL(x) {
const okx = oklab(x)
okx.l = 1 - okx.l
return okx
}
console.log(hexify(invL(parseHex("#663399"))))
This way no additional columns need to be added to the xls.
I like the idea of a light-mode for VSCode (and perhaps Sublime too). Great feature suggestion!
Hmm. How is theme/bioSyntax.json getting generated? There doesn't seem to be an analogue of makeThemeXML.sh for it...
The most similar file in the vscode codebase is https://github.com/microsoft/vscode/blob/main/extensions/theme-defaults/themes/dark_vs.json. I'd think a version from ~6 years ago, maybe https://github.com/microsoft/vscode/blob/4719230bf56f7ae14215a2bc661fb1ee45f7c168/extensions/theme-defaults/themes/dark_vs.json, is the ancestor here.
I'm thinking that we write a bit of JS to do the color thing and generate it... Probably from a "base" theme like the above and a tsv
@liyao001 any ideas here?
Writing some JS for a dark/light switch is a great idea.
If I remember correctly, the theme file was derived by combining files for the default Dark theme (extensions/theme-defaults/themes/dark_vs.json) (the first 560 lines?) and bioSyntax-sublime. We may be able to introduce a light theme by replacing the first part with configurations from the default light theme, but we have to test whether the strategy still works after so many iterations from the VSCode side.
(Some of the) colors still need adapting because dark and white backgrounds need different colors for visibility and overall color match. I'm starting to think more and more of this should indeed go into the xls... Maybe even the colorspace stuff...