I’ve just discovered the super handy hue-rotate CSS filter.
I’m using it as such:
filter: invert(95%) hue-rotate(180deg);
It lets me invert an item, but keeps the colours as they should be by flipping the hue back. I’m finding use implementing it on iframe embeds to force darkmode.