Overlay effect on scroll

Hello! Hope you’re well!
How can I make this nav bar effect where the color of the menu changes when it’s on top of a dark background? https://mykalios.com/
It looks like an overlay:
https://ibb.co/jbXdxFT

Thank you so much


Here is my public share link: LINK
(how to access public share link)