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: import colors from Pywal #10

Open
jcaw opened this issue May 6, 2019 · 4 comments
Open

Feature: import colors from Pywal #10

jcaw opened this issue May 6, 2019 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@jcaw
Copy link
Owner

jcaw commented May 6, 2019

Pywal automatically extracts colors from a wallpaper, and applies them to your current Linux session wherever it can (mainly, terminals). theme-magic exports colors, but it can't currently import them.

Add some method for importing Pywal colors, and turning them into a nice theme.

@jcaw
Copy link
Owner Author

jcaw commented May 6, 2019

Working on this on branch wal-theme-template.

The approach I'm taking is to create a theme that takes 16 colors as input, and generates intermediate colors each time it's loaded. The core theme is adapted from the spacemacs themes, because they have comprehensive coverage and follow easily understandable design patterns. Hopefully, these patterns should be generalisable.

Theoretically, this could eventually be refactored into a general Emacs theme generator.

Currently, the theme is minimally functional. Colors haven't been tweaked yet. This is an example of what is currently generated, using a test palette:

wal-template-preliminary-test

Permalink to the state at this point.

@jcaw
Copy link
Owner Author

jcaw commented May 6, 2019

The theme now extracts colors automatically from Pywal's cache when it's reloaded. There's no error handling (currently). It will fail if Pywal has no cached theme.

Now that importing is automatic, here are a few more test runs:

2019-05-06_08-01-53__May-06

2019-05-06_08-05-03__May-06

2019-05-06_08-05-48__May-06

Playing with some different themes, the current method doesn't do so well with light themes. This will need to be tweaked.

Permalink here.

@jcaw jcaw self-assigned this May 6, 2019
@jcaw jcaw added the enhancement New feature or request label May 6, 2019
@jcaw jcaw added this to the Create an Emacs Theme from Pywal milestone May 6, 2019
@jcaw
Copy link
Owner Author

jcaw commented May 7, 2019

Update: here's how the colors look now. Subtle changes, but I think they look much better.

2019-05-07_08-36-00__May-07

2019-05-07_08-36-47__May-07

2019-05-07_09-04-59__May-07

2019-05-07_09-06-08__May-07

@elsehow
Copy link

elsehow commented Sep 28, 2021

@jcaw This is great! Any plans to merge this into master?

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

No branches or pull requests

2 participants