Is there a way to have header font color change based on background?

I want my header font to change based on background is scrolling on top of. So for instance, the font is white currently, but I would like it to turn black if the background color is white.

It might theoretically be possible using code (@thomasj might have a better idea). That being said, I think the solution might be quite complex and manual :thinking: