Colouring in graph view

So I’m trying to change the colour of ALL nodes in graph view using the group function, except for the ones I’ve separately made groups for. I’ve tried path:/ and it hasn’t worked, regardless of whether I move it to the top or bottom of the list. Am I missing smth?

Here’s the snippet I use. I find it easier to use the snippet for defaults, and then the groups for exceptions.

/* Set node colors in graph view */

/* Node colors for dark  mode */
.theme-dark .graph-view.color-fill {
    color: green;
    opacity: 1.0;
}
.theme-dark .graph-view.color-fill-unresolved {
    color: red;
    opacity: 1.0;
}
.theme-dark .graph-view.color-fill-tag {
    color: yellow; 
    opacity: 1.0;
}
/* Node colors for light mode */
.theme-light .graph-view.color-fill {
    color: green;
    opacity: 1.0;
}
.theme-light .graph-view.color-fill-unresolved {
    color: red;
    opacity: 1.0;
}
.theme-light .graph-view.color-fill-tag {
    color: blue;
    opacity: 1.0;
}

Yes I realised the best way to achieve what I wanted was via CSS. I previously just modified a theme I was already using but this seems like a better, more permanent and customisable way. Thanks!