apache poi - is possible define new color for the font?
09:15 06 Nov 2025

I am using apache-poi.version 5.4.1.

Is possible to define new color for the font ?

CellStyle style = wb.createCellStyle();
style.setFillForegroundColor(IndexedColors.GREEN.getIndex());
style.setFillPattern(CellStyle.SOLID_FOREGROUND);
cell = rowxl.createCell((short) 7);
cell.setCellValue(" <<<>>>");
cell.setCellStyle(style);

There is used predefined color GREEN in the example.

But is possible to define completely new color (e.g. rgb(244, 255, 115)) ?

Thank you

apache-poi