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

Fix flag colours and marked/suspended/buried colours not showing up #40

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

iamllama
Copy link

@iamllama iamllama commented Dec 8, 2024

Closes #38

This fixes flag and marked/suspended/buried colours not showing up, by specially handling those cases and using ARGB hex instead of rgba(...)

@BlueGreenMagick
Copy link
Collaborator

Feels a bit hacky, but if it works, it works.

I think it'd be better to change hex_with_alpha_to_argb() function to check if hex_color.startswith("#") and len(hex_color) == 9:. Colors written as svg keywords (e.g. lightblue) should continue to work.

After the change, one downside is that colors written using argb(x, x, x, x) syntax will no longer work. But it's probably fine since I don't think anyone uses it anyway.

@iamllama
Copy link
Author

iamllama commented Dec 9, 2024

Added the mentioned check and support for rgba(...)

After the change, one downside is that colors written using argb(x, x, x, x) syntax will no longer work

Not sure what you mean by this. It never even worked to begin with, since QColor doesn't accept it and it isn't even part of the CSS standard, nor sass (unless you originally meant rgba(...))

@BlueGreenMagick
Copy link
Collaborator

LGTM!

I don't have access to its Ankiweb account, so you'll have to wait. I'm not sure who has it currently.

@iamllama
Copy link
Author

ACCENT_CARD and ACCENT_NOTE also need to be included in ARGB_ONLY_ENTRIES too, unfortunately, but they're blocked by ankitects/anki#3629

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

Successfully merging this pull request may close these issues.

All custom flag and card state colors displaying black in browse window
2 participants