JSFiddle - React, Tailwind, and code Playground
HTML
<div class="base">
<span>ほげほげほげ</span>
</div>
SCSS
span {
color: #fff;
position: absolute;
z-index: 1;
mix-blend-mode: difference;
}
.base {
width: 6.5em;
height: 1.5em;
position: relative;
}
.base::after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: repeating-linear-gradient(90deg, #fff 0, #fff 10px, #000 10px, #000 20px);
}