Skip to content

Conversation

@iamllama
Copy link
Contributor

@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
Contributor 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
Contributor 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

@abdnh abdnh merged commit 015793e into AnKing-VIP:main Dec 25, 2024
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

3 participants