Coloring in graph view by logical combination of tags

Now that the properties in Obsidian were overhauled significantly and the process of coloring by tag is simplified, I wonder if it’s possible to achieve coloring by certain logical combination of tags.

For example, I have these notes (I imagine my situation is not uncommon):

  • Note 1. Tags: A, B
  • Note 2. Tags: A
  • Note 3. Tags: A
  • Note 4. Tags: B

I can easily attach a color to nodes with tag A. But what if I want to have nodes that have both A and B have a different color?

I tried doing coloring by: ["tags": "A", "B"], but it doesn’t work

One could extend this request to “have A but not B” or “have B but not A”.

P.S. Search in this forum with queries “node coloring”, “color by tag”, “graph view coloring” only reveal CSS-based solutions that precede the official support of such feature.

You can use logic operators like AND ; OR ; XOR

Next step is to organize color hierarchy.

1 Like

I didn’t realize these fields shared syntax with the search bar. Thank you very much.

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