It seems unlikely that achieving the result you desire is possible. The text on the website you provided does not appear to be grayed out. When a section of the website is set to have a blue background and scrolled over, the email text turns yellow.
EDIT:
Using the following method, the text cannot detect its own background color. It can only adapt dynamically to the background of the parent element. Therefore, this approach will not replicate the exact outcome seen on the linked page. Apologies for any confusion.
This technique focuses on altering backgrounds or displaying high contrast text against backgrounds with varied colors.
You can experiment with the code below:
div {
background-color: #af0;
}
p {
background-color: inherit;
background-clip: text;
-webkit-background-clip: text;
color: transparent;
filter: invert(1) grayscale(1) contrast(9);
}
<div>
<p>Testing</p>
</div>
For more information, check out this website:
https://css-tricks.com/methods-contrasting-text-backgrounds/