[v1] Choosing color accents - tyuichis/modern-anki-card-template GitHub Wiki

Invalid subject name

When you type a subject that doesn't match anything in the Deck, you'll see this grayed out label:

To add a new subject color, you'll need to manually edit the template, both the front and back:

For example, to add a new subject such as "Phonetics", write it in lowercase:

  subjects = {
    algorithms: 'purple',
    'data structures': 'purple',
    react: 'pink',
    docker: 'turquoise',
    grammar: 'green',
    vocabulary: 'blue',
    reading: 'purple',
    phonetics : 'purple', // add here, and add a trailing comma to add more subjects later.
  };

[!NOTE] Surround the subject with '' quotes if it has spaces in the name, i.e. 'data structures'.

Here is a list of all the supported colors:

  • yellow
  • red
  • blue
  • green
  • orange
  • pink
  • turquoise
  • purple

How do I categorise my subject?

Based on your subject, there is actually a structure to how your colors are chosen (via AI).

For example, for Computer Science:

Purple

  • Category: Algorithms and Data Structures
  • Explanation: Represents topics related to computational techniques, problem-solving methods, and fundamental data structures used in computer science.
  • Examples:
    • Algorithms: sorting, searching, dynamic programming
    • Data Structures: trees, hash tables, linked lists

To see how colors are categorized for your subject, have a look at the color presets explanations here:

I have a lot of subjects to add!

If you have a big batch of subjects, you can visit an AI chatbot and generate subject label colors this way.

Refer to the prompt located in docs/generate-label-colors-prompt.txt.

To do that with a chatbot, follow these steps:

  1. Copy and paste the prompt and send.
  2. Enter in the subjects you need to study. For example, in a Deck about Organic Chemistry:
nomenclature, reactions, mechanisms, stereochemistry, spectroscopy, synthesis, functional groups, reagents, acids and bases, resonance
  1. You should get something like this structure back:
var subjects = {
    "nomenclature": "purple",
    "reactions": "green",
    "mechanisms": "blue",
    "stereochemistry": "blue",
    "spectroscopy": "turquoise",
    "synthesis": "pink",
    "functional groups": "purple",
    "reagents": "turquoise",
    "acids and bases": "purple",
    "resonance": "blue"
}
  1. Copy-paste the new subject object (or part of it) into each of the card template's front and back side HTML. Ready to use!