How to switch black and white colors using CSS filters?

For example, if we have the image below:
What “filter” in CSS can I use to switch the colors, that is: make background black and image content (in this case, we have “Word”) white. I’m not sure if a property other than “filter” is needed
I want to use this for the “Night mode” feature

There is an invert filter that should do the trick. Let us know what you find out.

@mtf is correct:

documentation is here