POI支持的颜色对比

color org.apache.poi.hssf.util.HSSFColor$GREY_80_PERCENT@1aadbf7
color org.apache.poi.hssf.util.HSSFColor$INDIGO@4f4458
color org.apache.poi.hssf.util.HSSFColor$PLUM@100c56
color org.apache.poi.hssf.util.HSSFColor$BROWN@19a1fae
color org.apache.poi.hssf.util.HSSFColor$OLIVE_GREEN@1960c9e
color org.apache.poi.hssf.util.HSSFColor$DARK_GREEN@168f39
color org.apache.poi.hssf.util.HSSFColor$SEA_GREEN@11525cd
color org.apache.poi.hssf.util.HSSFColor$DARK_TEAL@164e67f
color org.apache.poi.hssf.util.HSSFColor$GREY_40_PERCENT@158cfda
color org.apache.poi.hssf.util.HSSFColor$BLUE_GREY@1b613c0
color org.apache.poi.hssf.util.HSSFColor$ORANGE@cae1b3
color org.apache.poi.hssf.util.HSSFColor$LIGHT_ORANGE@1a7e798
color org.apache.poi.hssf.util.HSSFColor$GOLD@55d1ef
color org.apache.poi.hssf.util.HSSFColor$LIME@49b9ad
color org.apache.poi.hssf.util.HSSFColor$AQUA@3d0f0e
color org.apache.poi.hssf.util.HSSFColor$LIGHT_BLUE@a7624e
color org.apache.poi.hssf.util.HSSFColor$TAN@1271218
color org.apache.poi.hssf.util.HSSFColor$LAVENDER@150b2d
color org.apache.poi.hssf.util.HSSFColor$ROSE@190c9dc
color org.apache.poi.hssf.util.HSSFColor$PALE_BLUE@b4bc8e
color org.apache.poi.hssf.util.HSSFColor$LIGHT_YELLOW@1c74456
color org.apache.poi.hssf.util.HSSFColor$LIGHT_GREEN@15783a2
color org.apache.poi.hssf.util.HSSFColor$LIGHT_TURQUOISE@830993
color org.apache.poi.hssf.util.HSSFColor$SKY_BLUE@e99642
color org.apache.poi.hssf.util.HSSFColor$BLUE@187f194
color org.apache.poi.hssf.util.HSSFColor$TEAL@55f9f
color org.apache.poi.hssf.util.HSSFColor$DARK_RED@c8e08f
color org.apache.poi.hssf.util.HSSFColor$VIOLET@edd19
color org.apache.poi.hssf.util.HSSFColor$TURQUOISE@1d5c7a1
color org.apache.poi.hssf.util.HSSFColor$YELLOW@252119
color org.apache.poi.hssf.util.HSSFColor$PINK@19ff062
color org.apache.poi.hssf.util.HSSFColor$DARK_BLUE@15eb4d0
color org.apache.poi.hssf.util.HSSFColor$LIGHT_CORNFLOWER_BLUE@b0e84b
color org.apache.poi.hssf.util.HSSFColor$ROYAL_BLUE@62a19d
color org.apache.poi.hssf.util.HSSFColor$CORAL@16075b3
color org.apache.poi.hssf.util.HSSFColor$ORCHID@1cf46c2
color org.apache.poi.hssf.util.HSSFColor$LIGHT_TURQUOISE@12e8a41
color org.apache.poi.hssf.util.HSSFColor$LEMON_CHIFFON@76ec7a
color org.apache.poi.hssf.util.HSSFColor$PLUM@19f7952
color org.apache.poi.hssf.util.HSSFColor$CORNFLOWER_BLUE@d60cdd
color org.apache.poi.hssf.util.HSSFColor$GREY_50_PERCENT@e6bc11
color org.apache.poi.hssf.util.HSSFColor$GREY_25_PERCENT@452267
color org.apache.poi.hssf.util.HSSFColor$TEAL@d5b614
color org.apache.poi.hssf.util.HSSFColor$VIOLET@a4e3ae
color org.apache.poi.hssf.util.HSSFColor$DARK_YELLOW@15fd4a3
color org.apache.poi.hssf.util.HSSFColor$DARK_BLUE@8137c9
color org.apache.poi.hssf.util.HSSFColor$GREEN@1757596
color org.apache.poi.hssf.util.HSSFColor$DARK_RED@7ad4d5
color org.apache.poi.hssf.util.HSSFColor$TURQUOISE@2aee3f
color org.apache.poi.hssf.util.HSSFColor$PINK@7f788b
color org.apache.poi.hssf.util.HSSFColor$YELLOW@c311d5
color org.apache.poi.hssf.util.HSSFColor$BLUE@c7e580
color org.apache.poi.hssf.util.HSSFColor$BRIGHT_GREEN@1ac55ac
color org.apache.poi.hssf.util.HSSFColor$RED@12cc460
color org.apache.poi.hssf.util.HSSFColor$WHITE@10ad7e
color org.apache.poi.hssf.util.HSSFColor$BLACK@ee336f

也可以使用自定义颜色

HSSFPalette palette = ((HSSFWorkbook) workbook).getCustomPalette();
palette.setColorAtIndex((short) 10, (byte) 220, (byte) 72, (byte) 58); 
CellStyle cellStyle = workbook.createCellStyle();
cellStyle.setFillForegroundColor((short) 10);// 前景色(10是在palette中设计的序号)
cellStyle.setFillPattern(CellStyle.SOLID_FOREGROUND);// 填充模式


你可能感兴趣的:(poi,自定义,颜色)