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

Use base16 theme as input #88

Open
mewoocat opened this issue Jul 4, 2024 · 6 comments
Open

Use base16 theme as input #88

mewoocat opened this issue Jul 4, 2024 · 6 comments

Comments

@mewoocat
Copy link

mewoocat commented Jul 4, 2024

I was wondering if it would be feasible to implement a base16 theme input to Matugen? I understand that I could create an image palette with the given theme's colors, but being able to input a .json file and get the material colors version of the them would be very nice.

@Mikilio
Copy link

Mikilio commented Jul 11, 2024

Unfortunately, all schemes are generated from a single color. Only one color is extracted from the Image and a scheme is built from it. Bigger changes are necessary for this to work.

@InioX
Copy link
Owner

InioX commented Jul 12, 2024

That would require forking and modifying the material-colors library. I'm not against making small changes but I don't know about these big ones. I guess if enough people request this then I'll try to add this.

@Mikilio
Copy link

Mikilio commented Jul 12, 2024

I'm not a contributor, but I wanted something like this myself because I use a program that happens to style itself with matugen. A way I can see this kind of functionality happen without making big changes to material-colors is the following approach:

  • Given a base16 colorscheme and a image (or color), first determine 3 of the last 8 colors (the accent colors) are most suitable to generate the theme from. The best suited will be chosen as primary, then second best as secondary, the 3rd as ternary.
  • A theme will be generated from these 3 colors. (If not possible, generating just from the primary is fine)
  • The first 8 colors will be used to override the Background and Surface colors.

This approach allows augmenting a generated material theme to be augmented with the custom styling decision of a base16 theme.

What do you think @InioX? To be honest I understand if you feel like this it outside of the scope for matugen.

@0x15BA88FF
Copy link

I would also wish for this feature to be implemented :)

@0x15BA88FF
Copy link

Hello @InioX,
I was working on my dotfiles and i realized that the [config.custom_colors] feature works really as a alternative to a base16 color generator.
if possible, you can implement file inclusion to use as [config.custom_colors] in that way we can still use a base16 palette generator like pywal or wallust and with material U colors.

But that would be up to the community and you to decide.

@InioX
Copy link
Owner

InioX commented Dec 14, 2024

I was thinking about adding support for running commands inside [config.custom_colors] or [config.custom_keywords]

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

4 participants