Coloring text based on type of bracket enclosing it

I have just started using Obsidian for taking and organizing notes for my research. I would like to set up my vault so that certain text enclosed within two types of brackets (currently planning to use pointed and curly brackets) and within quotation marks is each colored differently. Thus, the special types of text, each with its own unique color. This schema should apply to all notes within my research vault.

I’ve done some browsing and believe I have learned that the “best” way to do this is with custom css snippets. But so far, I haven’t wrapped my head around exactly how to do this. (This is likely a simple thing, and I’m just being dense. But I hope someone here will take pity on me as a newbie to Obsidian!) Will someone please guide me through the process?

You’ll need a plugin in addition to some CSS to do this.

I haven’t tried it yet, but have a look at:

Also have a look at:

I use this one for a few things and it works well.

1 Like

Thanks for the response. I was hoping to be able to do this without adding a plugin. But I will give a look at both of those.

If you wanted to hijack **bold**, _italic_, ***bold italic***, ==highlights==, %%comments%%, combinations of those, and maybe one or two more built-in options, you could easily (more or less) do that with CSS alone. However, CSS can’t target arbitrary text (e.g., make all instances of {fish} a salmon color). For that, you need a plugin as well.

1 Like

One example of coloring and highlighting by combining = and *, using CSS only, is from the https://github.com/PKM-er/Blue-Topaz_Obsidian-css theme:

1 Like