Change the color of certain words from once shade of red to another shade of red

Hello,

I have created over 35,000 cards in the medical field and use different colors to annotate diseases, drugs, process, etc. I recently decided to change the color of certain words from once shade of red to another shade of red. How do I implement this change on a mass scale simultaneously for all 35,000 cards without having to correct each card as I come across it? Is there a way through the card design interface where I can look up only red words and change the pantone shade?

How do I search for all the cards with the color I want to change so I can make the change?

Any help would be appreciated.

Thanks

1 Like

Can you be more specific?
Where and how did you apply the coloring — on the styling-tab via CSS .YourColorClass or directly in the html-code?
Paste a coded example or provide a screenshot that shows the color-assignment you want to replace.

1 Like

If you applied the color to individual fields and not the card template, you can view the HTML code for a card to see the HTML color code, then use the find&replace feature to update your notes in bulk.

1 Like

And if you applied the color on the card template, you clone the template, adjust the new color values, then assign your cards to this new template.

Old red color I originally instituted ↓

New color I want to employ (ON ALL CARDS WITH OLD HTML COLOR) ↓

I found the new HTML. Where is find and replace feature? What do i search for? What do i type?

Can I go to the CARD TEMPLATE option and replace the old HTML with new HTML?
How do i do that?

Used the styling tab for each card, as I was making the cards.

I should have created a card template with desired HTML colors but I did not know how

Find and Replace is in the Browse window – Browsing - Anki Manual.

If this is the only way that you use this old red color in your notes, and you want to change it for every instance of red, you can just replace the color:
rgb(252, 1, 7)rgb(184, 0, 0)

I note a couple other things in your screenshots.

  1. In the old, your text is also bold. Do you want it to stay that way?
  2. In the new, you changed the color for the words, but not for the extra space character ( ) that follows it. That probably won’t hurt anything, but it’s not ideal.

That is another method to apply colors/formatting. Since you are already applying that color in the field itself, to switch methods you would need to create a new class in your note type Styling (Styling & HTML - Anki Manual) called syndrome, or whatever red represents – add the red (and bold?) formatting there, and then change all of your notes to call that style class for this phrase instead of setting the format separately on each note. (If you use this formatting on multiple note types, you’d need to do this Styling change for each one.)

3 Likes

There is an add-on that lets you do find and replace within templates:
https://ankiweb.net/shared/info/992153575

That should do what you want.

After you install it, it adds a “Find and Replace in Templates” option to the Edit menu of the Browse window.

2 Likes