src/org/tiefaces/components/websheet/utility/ColorUtility.java
static String getBgColorFromCell(final Workbook wb, final Cell poiCell,
			final CellStyle cellStyle) {

		String style = "";
		if (poiCell instanceof HSSFCell) {
			int bkColorIndex = cellStyle.getFillForegroundColor();
			HSSFColor color = HSSFColor.getIndexHash().get(bkColorIndex);
			if (color != null) {
				// correct color for customPalette
				HSSFPalette palette = ((HSSFWorkbook) wb)
						.getCustomPalette();
				HSSFColor color2 = palette.getColor(bkColorIndex);
				if (!color.getHexString()
						.equalsIgnoreCase(color2.getHexString())) {
					color = color2;
				}
				style = "background-color:rgb("
						+ FacesUtility.strJoin(color.getTriplet(), ",")
						+ ");";
			}
		} else if (poiCell instanceof XSSFCell) {
			XSSFColor color = ((XSSFCell) poiCell).getCellStyle()
					.getFillForegroundColorColor();
			if (color != null) {
				style = "background-color:rgb(" + FacesUtility.strJoin(
						getTripletFromXSSFColor(color), ",") + ");";
			}
		}
		return style;
	}
static String getBgColorFromCell(final Workbook wb, final Cell poiCell,
			final CellStyle cellStyle) {

		String style = "";
		if (poiCell instanceof HSSFCell) {
			int bkColorIndex = cellStyle.getFillForegroundColor();
			HSSFColor color = HSSFColor.getIndexHash().get(bkColorIndex);
			if (color != null) {
				// correct color for customPalette
				HSSFPalette palette = ((HSSFWorkbook) wb)
						.getCustomPalette();
				HSSFColor color2 = palette.getColor(bkColorIndex);
				if (!color.getHexString()
						.equalsIgnoreCase(color2.getHexString())) {
					color = color2;
				}
				style = "background-color:rgb("
						+ FacesUtility.strJoin(color.getTriplet(), ",")
						+ ");";
			}
		} else if (poiCell instanceof XSSFCell) {
			XSSFColor color = ((XSSFCell) poiCell).getCellStyle()
					.getFillForegroundColorColor();
			if (color != null) {
				style = "background-color:rgb(" + FacesUtility.strJoin(
						getTripletFromXSSFColor(color), ",") + ");";
			}
		}
		return style;
	}
static String getBgColorFromCell ( final Workbook wb , final Cell poiCell , final CellStyle cellStyle ) { String style = "" ; if ( poiCell instanceof HSSFCell ) { int bkColorIndex = cellStyle . getFillForegroundColor ( ) ; HSSFColor color = HSSFColor . getIndexHash ( ) . get ( bkColorIndex ) ; if ( color != null ) { // correct color for customPalette
 HSSFPalette palette = ( ( HSSFWorkbook ) wb ) . getCustomPalette ( ) ; HSSFColor color2 = palette . getColor ( bkColorIndex ) ; if ( ! color . getHexString ( ) . equalsIgnoreCase ( color2 . getHexString ( ) ) ) { color = color2 ; } style = "background-color:rgb(" + FacesUtility . strJoin ( color . getTriplet ( ) , "," ) + ");" ; } } else if ( poiCell instanceof XSSFCell ) { XSSFColor color = ( ( XSSFCell ) poiCell ) . getCellStyle ( ) . getFillForegroundColorColor ( ) ; if ( color != null ) { style = "background-color:rgb(" + FacesUtility . strJoin ( getTripletFromXSSFColor ( color ) , "," ) + ");" ; } } return style ; }
Gets the bg color from cell.

@param wb
the wb
@param poiCell
the poi cell
@param cellStyle
the cell style
@return the bg color from cell
Gets the bg color from cell .