title: How do I detect the inherited background-color of an element using jQuery/JS?
body: <p>Using jQuery (or just JavaScript), how do I detect the inherited background-color of an element?</p>
  
  <p>For example:</p>
  
  <pre><code>&lt;div style="background-color: red"&gt;
      &lt;p id="target"&gt;I'd like to know that the background-color here is red&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>However:</p>
  
  <pre><code>$('#target').css('background-color') == rgba(0,0,0,0)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>$('#target').css('backgroundColor') == rgba(0,0,0,0)
  </code></pre>
  
  <p>I'm asking for a general solution.  <code>$('#target').parent().css('background-color')</code> would work in this instance, but not all.</p>