title: get computed background color as rgb in IE
body: <p>I am trying to get the RGB background color in IE using the following code:</p>
  
  <pre><code>function getStyle(elem, name) {
      // J/S Pro Techniques p136
      if (elem.style[name]) {
          return elem.style[name];
      } else if (elem.currentStyle) {
          return elem.currentStyle[name];
      }
      else if (document.defaultView &amp;&amp; document.defaultView.getComputedStyle) {
          name = name.replace(/([A-Z])/g, "-$1");
          name = name.toLowerCase();
          s = document.defaultView.getComputedStyle(elem, "");
          return s &amp;&amp; s.getPropertyValue(name);
      } else {
          return null;
      }
  }
  
  var $b = $("&lt;button&gt;");
  $b.css("backgroundColor", "ButtonFace");
  $("body").append($b);
  alert("button bg color is: "+ getStyle($b[0],"backgroundColor"));
  //alerts 'buttonface'
  </code></pre>
  
  <p>this does not return an rgb color value like firefox does, it returns 'buttonface' which is useless to me.</p>