title: Selenium WebElement getCssValue background colour misrepresented?
body: <p>I am using Selenium Webdriver for automating functional testing on a javascript based web application.
  The javascript code (knockout.js) sets one of the OPTION elements for a SELECT dropdown lists to a different colour #FFFFCC, which is rgba(255, 255, 204, 1) (light yellow) (as verified by firebug).</p>
  
  <p>My code for use by selenium is as follows:</p>
  
  <pre><code>    Select select = new Select(driver.findElement(By.id("views"))); // get the select
      List&lt;WebElement&gt; allOptions = select.getOptions(); // get all the options
  
      for (WebElement option : allOptions) { //iterate over the options
        if (option.getCssValue("background-color").compareToIgnoreCase("rgba(255, 255, 204, 1)") == 0) {
           // do something 
        }
      }
  </code></pre>
  
  <p>But that if statement always fails. When I do a system.out.println() to the value of <code>option.getCssValue("background-color")</code> it returns 'transparent' for all my option elements and 'rgba(51, 153, 255, 1)' for my modified option element, which when converted to hex is #3399FF (a blue colour).</p>
  
  <p>Why is selenium reporting the incorrect hex value for this element?</p>