Streaming live at 10am (PST)

Switch Text Color on Scroll

Hello everyone,
So I am working on creating my own personal website, and I am trying to do something cool where my text switch’s colour when the background do (when BG goes black the text goes white and vice versa) but I can’t manage to find out how, so if any help is appreciated.
Thanks in advance!!
Here is a preview of my project :