The MDN reference for CSS color values says, that I can specify an RGB color either as hexademical code (color: #ff0000;
) or as a functional notation (color: rgb(255, 0, 0);
).
Obsidian however seems to recognize only the former, but not the latter.
I have tested it with callouts. This works:
.callout {
background-color: rgb(255,0,0);
}
This works also:
.callout {
background-color: oklch(40.1% 0.123 21.57);
}
This doesn’t:
.callout {
--callout-color: rgb(255,0,0);
}
Strangely enough, this does work:
.callout {
--callout-color: 255, 0, 0;
}
But this notation is not valid CSS.
It seems that it is not possible to assign a color value to a color variable with a standard CSS
functional notation. Am I missing something?