Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix alpha when set from a .json #531

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fc-anjos
Copy link

@fc-anjos fc-anjos commented Jun 11, 2020

When trying to set a color scheme using pywal as a module, such as in this example, alpha was not being correctly exported. In .Xresources, for instance, URxvt*background would be set with [100]#rrggbb. This pull request fixes this behavior by:

Specifying a default value for the cases when alpha is not in data:
pywal/theme.py

if "alpha" not in data:
    data["alpha"] = "100"

and setting util.Color.alpha_num from data:
pywal/export.py

util.Color.alpha_num = all_colors["alpha"]

These changes can be appreciated in their context in the diff.

Open to implement further changes if I am missing something.
Thank you.

@fc-anjos
Copy link
Author

Closing this pull request until I am able to fix broken functionality due to the changes.

@fc-anjos fc-anjos closed this Jun 11, 2020
@fc-anjos fc-anjos deleted the alpha_fix branch June 11, 2020 02:24
@fc-anjos fc-anjos reopened this Jun 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant