Anki changes color of answer texts into blue instead of black

Anki changes the color of the answer text of the flashcards when I paste something copied. Instead of black font, the font is blue.
When I click on “Customize card templates”, it says the color is black under “Style” although it is blue (see photo).
How can I change the color to black?

CSS Styling templates will be overriden by styles and/or html tags placed directly in the text. Examine your pasted text, you will probably find color information there that takes priority over your template.

To avoid this in the first place, paste as unformatted text or try using a clipboard tool. They usually let you customize what formatting you want to keep and what not when you do copy and paste operations.

1 Like

You can strip colors by pasting while holding down shift, or by changing the default paste behavior in the preferences screen.

I have now changed the setting so that copied texts no longer retain their formatting and this now also works.

But is it somehow possible to change the color of the text afterwards, since I have already written all the cards?

As I said, it doesn’t work if I change the color to black in the editing mode of the card. The text still remains blue.

Running a Search and Replace action on afflicted field(s) should do the trick.
However, unless you are familar with “Regular Expressions”, you might want to post one of your text fields here in the forum first (not the template, but the actual html-tags that surround your pasted text.)

There are many ways to color-code text. It is impossible to construct a suitable search term, without seeing your html-tags first.

Is that what you mean?

I think in your case, the blue color results from the anchor-tag, which renders the whole passage as a link. Simply remove the anchor-tags. You don’t even need RegEx to do this, a normal Search and Replace should be sufficient.

Be aware, however, that I can only judge from this one example you provided. It is your responsibility to ensure that your other notes are of the same nature. Should some of them actually DO contain valid links, these will not work anymore after you remove the tags.

Backup your data first.
Open the Anki-Browser.
For starters, try it on one note only. Then on a small selection of notes. Proceed at your own risk!

Ctrl+Alt+F should bring up the Search and Replace dialog (Suchen und Ersetzen)


1 Like

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