title: Splitting Text Color with CSS when compared to the background
body: <p>I'm trying to achieve the following but really struggling. I simply am trying to achieve a diagonal background which goes through the text and changes the colour my choice.</p>
  
  <p><a href="https://i.stack.imgur.com/KcMDls.png" rel="noreferrer"><img src="https://i.stack.imgur.com/KcMDls.png" alt="Split Text Image Example"></a></p>
  
  <p>I'ved tried using css mixed-blend-mode however it just contrasts my colors rather than having the option to split into two different colors.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>* {
    margin: 0;
    padding: 0
  }
  
  header {
    overflow: hidden;
    height: 100vh;
    background-color: #FFF;
    background-image: -webkit-linear-gradient(30deg, #FFF 50%, #adf175 50%);
    min-height: 500px;
  }
  
  h2 {
    color: white;
    font: 900 35vmin/35vh cookie, cursive;
    text-align: center;
    position: fixed;
    top: 0px;
    left: 20px;
    mix-blend-mode: difference;
  }
  
  h2:after {
    color: white;
    mix-blend-mode: difference;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;header&gt;
    &lt;h2&gt;On A Mission&lt;/h2&gt;
  &lt;/header&gt;</code></pre>
  </div>
  </div>
  </p>