Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

272
Visualizações
CSS Custom text color based on background

Below is a screenshot of my current situation. Is it possible to make the text within the blob.svg white, and the text outside the blob.svg the color of the blob (#e60050)?

There is also a parallax effect on this particular element. The blob scrolls slower than the text. Therefore the text does not always overlap the blob in the same way/position. Based on the scrolling position, the text may even be completely within or without the blob.

I have been messing around with various implementations of mix-blend-mode now, but i can't seem to figure it out.

Current situation

<div id="sf-coming-up">
    <div class="title">Binnenkort in ons theater</div>
    <img class="blob" src="/assets/blob_vector_1.svg" />
</div>
.blob {
  position: absolute;
  top: 0;
  right: 20%;
  z-index: -1;
}

.title {
  padding-top: 50px;
  color: #FCFBFA;
  mix-blend-mode: difference;
}

1

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You can try using inverted colors and re-inverting the whole thing with a CSS filter like so:

body {
  margin: 0;
}

#sf-coming-up {
  filter: invert(1);
  height: 100vh;
}

.blob {
  position: absolute;
  top: 15%;
  right: 15%;
  z-index: -1;
  width: 70%;
  height: 70%;
  border-radius: 25% 75% 25% 50% / 75% 25% 50% 25%;
  background: springgreen;
}

.title {
  padding: 25vh 0 0 12.5vh;
  color: springgreen;
  mix-blend-mode: difference;
}
<div id="sf-coming-up">
  <div class="title">Binnenkort in ons theater</div>
  <div class="blob"></div>
</div>

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda