fontColorRgb property

  1. @override
Color get fontColorRgb
override

Gets/sets font color Rgb.

Implementation

@override

/// Gets/sets font color Rgb.
Color get fontColorRgb => _fontColorRgb;
  1. @override
set fontColorRgb (Color value)
override

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

@override
set fontColorRgb(Color value) {
  _fontColorRgb = value;
  _fontColor = _fontColorRgb.value.toRadixString(16).toUpperCase();
}