Wow, thank you so much.
But how do you do that depending on a scrolling position?
The real live example is a sticky overlay header with transparent background, consisting of a logo and some menu elements in a 100vh hero section with a dark background image. The initial color of all header elements is white.
When the user scrolls down, and the header leaves the hero section, the color of the header elements should change to a different color.