How to invert colors of a picture on Mac? How do I invert the colors of an image?

I'm using macOS 10.13 and I wish to use built-in Apple software or freeware.
Open the image in Preview.app (macOS built in default image viewer).
Choose Tools → Adjust Colour ⌥⌘C.
Swap the left-most and right-most points on the graph.