For example, with the following trick and a slight adjustment to keep default dark mode colors uninverted.
HTML
<span style="background:#4577be;color:white"> seedling </span>
<span style="color:#5e1624">NAmE</span>
noun
Light Mode
Dark Mode
Styling
.night-mode [style*="color:"], .night-mode [style*="background:"] {
filter: invert(100%);
}