How do you apply transparency/opacity in the text highlight color tool?

Let’s talk about the text highlighting tool:

I want to be able to apply highlighting to my text, but the highlight looks so strong that it can make my text unreadable:

To get this result, I highlighted some text and clicked on the “text highlight color” tool.

I want to be able to select a color and set the opacity of that color (RGBA), however Anki seems to only allow to choose a color that fits in the RGB model.

I have to manually change the HTML in the editor to change the code from background-color: rgb(242, 242, 1); to background-color: rgba(242, 242, 1, 0.2);

With this change, the card looks like this:


This makes it quite more readable, but it can take a long time to manually change the background-color setting everytime.

Is there any easier way to set transparency to highlighting text?

Thank you for reading!

The color picker is the standard browser one, which doesn’t support alpha values. You’ll need to either use find&replace, or use an add-on (https://ankiweb.net/shared/info/2491935955 will probably work)

Unfortunately, that add-on doesn’t solve the problem, as it only accepts RGB codes. Also, it only lets you apply text color, not text highlight.

Sorry about that, I’d forgotten that it doesn’t support background colors. It also relies on the underlying contenteditable API, and it appears that API doesn’t support alpha codes.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.