title: IF condition with background-color in RGBA
body: <p>How to write an <strong>IF</strong> condition in purely <strong>JavaScript</strong> to check if background color of <code>&lt;li&gt;</code> tag is equal to particular RGBA color combination.</p>
  
  <p>For example:</p>
  
  <pre><code>if(document.getElementById('element').style.backgroundColor == "rgba(213,212,212,0.5)")
  {
       alert("MATCHED");
  }
  else
  {
       alert("FAILED");
  }
  </code></pre>
  
  <p>But this comparison for IF statement does <strong>NOT</strong> work! Please help!</p>