Hello everyone! Recently, I got some problems with the cards I created, so I need some help. The cards I created (almost 2000) have some text highlighted in a dark blue color. I did it to make the learning easier but recently I discovered that this dark blue color is almost invisible in night mode. Mostly I gonna learn cards in night mode, so I want to replace this dark blue with a lighter one.
I know that Anki uses some HTML, and I was thinking about seeking the color code in HTML and replacing it with a new one. But I don’t know how to do it for all decks and cards I have. Do you have any ideas on how I can replace a specific color for all cards?
You can define separate colours for light and night mode by adding something like this to your template styling:
.highlight {
color: blue;
}
.nightMode .highlight {
color: lightblue;
}
Look at the HTML of some field (Ctrl+Shift+X) to find out what styling is used for your highlighted text, probably something like color="#0000ff"
. If you don’t use any other styling, a simple Find & Replace with class=highlight
will do the trick. But make sure to have a backup and let us know if the case is more complicated.
Rumo, thank you for your response. Do you offer to replace
<b>rummage</b><div><font color="#00007f">/ˈrʌm.ɪdʒ/</font><br></div><div>[sound:rummage.mp3]<br></div>
to
<b>rummage</b><div><font class = highlight >/ˈrʌm.ɪdʒ/</font><br></div><div>[sound:rummage.mp3]<br></div>
, right?
The one thing I don’t know is how to edit CSS and HTML for all cards. Should I use some addons?
Yes. No add-ons required, just use Find & Replace like this: