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

[Feature request] Expose colors #35

Closed
AntoinePrv opened this issue Jul 9, 2024 · 3 comments
Closed

[Feature request] Expose colors #35

AntoinePrv opened this issue Jul 9, 2024 · 3 comments
Assignees

Comments

@AntoinePrv
Copy link

Is your feature request related to a problem? Please describe.

Some base16 projects are not build for all themes, either because they are out of date, or because they can register them from the user dynamically (e.g. https://github.com/echasnovski/mini.base16).

I would be nice to have a way to simply access the colors of the theme without further infrastructure.
If I understand correctly, tinty does not currently know anything about the current theme color, it only looks for filename with the theme name.

Describe the solution you'd like

A simple solution would be to reuse tinted-theming infrastructure with a repo tinted-json that would expose that.

Describe alternatives you've considered

Alternatively, it would be ideal if tinty integrated with tinted-builder-rust to generate the theme files from the template on the fly without having to setup a whole infrastructure for every base16 project

Additional context

@JamyGolden
Copy link
Member

I don't really understand the mini.base16 plugin properly. How are the schemes used to create nvim colorscheme files? I just two files there and from my understanding you would need to create your own colorschemes based on their provided ones.

I could add that to tinty in a single command, like tinty apply base16-uwunicorn --build and have it build before applying, however you could create a script yourself:

set_theme() {
  theme=$1
  
  tinty build path/to/base16-template # uses tinted-builder-rust build command
  tinty apply $1
}

alias tinty-apply-build=set_theme

and then run tinty-apply-build base16-uwunicorn to apply the theme.

Would something like this solve your problem?

@AntoinePrv
Copy link
Author

Thanks for the quick answer! I did not know about tinty build but I was using an outdated version, thanks for the update!
That does solve my issue yes. I think it's awesome because it greatly reduce the effort to setup a new base16 project.

I'm not fully familiar with mini myself, only that to set it up, you pass a palette as a map in neovim (there are no pre-built theme). In that sense I don't think it respects the base16 specification.

@JamyGolden
Copy link
Member

Great, I'm glad it solves it for you!

Ah ok I see. For vim specifically we have https://github.com/tinted-theming/base16-vim which has all the themes built as part of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants