I would like to have some text that when it is over red, it changes to white, and when over grey, it changes to black. This image shows what I want to achieve. The text may go over onto more than one line.
UPDATE: I managed to get it working by using this code to set a gradient text colour:
color:transparent;
-webkit-background-clip: text;
background-clip: text;
background-image: linear-gradient(
to right,
#ffffff 0%,
#ffffff 50%,
#000000 50%,
#000000 100%
);