title: Apache POI - background colours not as expected
body: <p>Thanks for looking.</p>
  
  <p>Im using Apache POI to read an excel file. I want to use conditional logic that will use background colour. But I don't understand the results Im getting.</p>
  
  <p>Why does following code show different results for same colours?</p>
  
  <p>Code:</p>
  
  <pre><code>XSSFCell cell = (XSSFCell) row.getCell(i);     
  if(cell.getDateCellValue()!=null) {
    DateTime val = new DateTime(cell.getDateCellValue()); //Joda-Time lib.
  
    XSSFCellStyle cellStyle = (XSSFCellStyle) cell.getCellStyle().clone();
    cellStyle.setFillPattern(XSSFCellStyle.SOLID_FOREGROUND);
    XSSFColor x = cellStyle.getFillForegroundXSSFColor();
  
    String colorStrVal =  x==null ? "null" : x.getARGBHex() + ":" + x.getIndexed();
    System.out.println(val.toString("dd/MM/yyyy") + " - " + colorStrVal);
  }
  </code></pre>
  
  <p>Results - I expect non-specified colour entries to all be same (they are grey and look fine in excel - all register as same colour):</p>
  
  <pre><code>06/04/2007 - FFFFFFFF:0
  02/06/2008 - FFFFFFFF:0
  10/05/2011 - FFFFF2B9:0 //yellow
  26/07/2008 - FFFFFFFF:0
  04/07/2010 - FFFFFFFF:0
  12/04/2009 - FFFFFFFF:0
  19/09/2010 - FFFFFFFF:0
  16/04/2011 - FFFFFFFF:0
  16/01/2009 - FFFFFFFF:0
  16/06/2010 - FFD9D9D9:0
  14/05/2011 - FFD9D9D9:0
  07/12/2007 - FFFFFFFF:0
  22/02/2009 - FFFFFFFF:0
  25/10/2009 - FFFFFFFF:0
  11/08/2008 - FFFFFFFF:0
  29/10/2009 - FFFFFFFF:0
  06/09/2010 - FFFFFFFF:0
  24/06/2011 - FFE60000:0 //red
  15/08/2008 - FFFFFFFF:0
  17/09/2010 - FFFFFFFF:0
  27/03/2011 - FFFFFFFF:0
  19/05/2008 - FFFFFFFF:0
  26/05/2009 - FFFFFFFF:0
  03/09/2010 - FFFFFFFF:0
  25/04/2011 - null       //white
  22/06/2011 - FFFFF2B9:0 //yellow
  25/09/2009 - FFFFFFFF:0
  20/04/2011 - FFFFFFFF:0
  16/06/2011 - FFFFF2B9:0 //yellow
  02/03/2010 - FFD9D9D9:0
  31/01/2011 - FFD9D9D9:0
  03/06/2011 - FFFFF2B9:0 //yellow
  03/07/2010 - FFFFFFFF:0
  12/09/2010 - FFFFFFFF:0
  14/11/2010 - FFE60000:0 //red
  23/06/2011 - FFFFF2B9:0 //yellow
  24/06/2011 - FFFFF2B9:0 //yellow
  18/09/2010 - FFD9D9D9:0
  11/03/2011 - FFD9D9D9:0
  25/12/2010 - null       //white
  17/05/2011 - FFEEECE1:0 //blue
  27/03/2010 - FFFFFFFF:0
  12/03/2011 - FFFFFFFF:0
  14/03/2011 - FFFFFFFF:0
  </code></pre>