fontColorRgb property

Color fontColorRgb
getter/setter pair

Gets/sets font color Rgb.

final Workbook workbook = Workbook();
final Worksheet sheet = workbook.worksheets[0];
final CellStyle cellStyle1 = CellStyle(workbook);
cellStyle1.name = 'Style1';
// set fontcolor Rgb.
cellStyle1.fontColorRgb = Color.fromARgb(255, 56, 250, 0);
workbook.styles.addStyle(cellStyle1);
final Range range1 = sheet.getRangeByIndex(1, 1);
range1.cellStyle = cellStyle1;
final List<int> bytes = workbook.saveAsStream();
File('CellStyle.xlsx').writeAsBytes(bytes);
workbook.dispose();

Implementation

late Color fontColorRgb;