-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add light/dark scheme-variant
support to builder.md
#66
Conversation
I think |
Yeah I also prefer If you want to automate adding variants to existing themes here's the code I use to automatically determine if the theme is light or dark return (5 * c.green() + 2 * c.red() + c.blue()) <= 8 * 128; And the original source is from here However this doesn't work in all cases I think, as evidenced by this issue so manual review might be needed. |
I like the idea of it being variant in the scheme files as well. One other thing worth noting - there's no way to check Also, could you bump the version to 0.11.0-dev rather than 0.11.0? I'd like to bundle changes together if possible, especially because the scheme system changes should be close. |
ef34fca
to
a112d9d
Compare
scheme-type
support to builder.mdscheme-variant
support to builder.md
a112d9d
to
1179eb1
Compare
Yeah I think exporting |
1179eb1
to
6603b65
Compare
6603b65
to
c8bc5c6
Compare
There are times when the generated colorschemes requires a dark/light variant, such as for VSCode: https://github.com/golf1052/base16-generator/blob/master/themes/base16-apathy-dark.json#L4. Until we add this support to the spec, vscode templates can't use any of our official builders.
type
isn't an amazing property name, maybevariant
would work better? My thought was to go for a string value instead of a boolean variant since one day we may have light, dark and medium for example 🤷We'd have to add this field to each scheme, but I could do that after we merge this. There may be several things I'm missing here, but I just wanted to get a PR out so we could discuss.