backColorRgb property

  1. @override
Color get backColorRgb
override

Gets/sets back color Rgb.

Implementation

@override

/// Gets/sets back color Rgb.
Color get backColorRgb => _backColorRgb;
  1. @override
set backColorRgb (Color value)
override

Gets/sets back color Rgb.

final Workbook workbook = Workbook();
final Worksheet sheet = workbook.worksheets[0];
final CellStyle cellStyle1 = CellStyle(workbook);
cellStyle1.name = 'Style1';
// set backcolor Rgb.
cellStyle1.backColorRgb = 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 backColorRgb(Color value) {
  _backColorRgb = value;
  if (_backColorRgb.value.toRadixString(16).toUpperCase() != 'FFFFFFFF') {
    _backColor = _backColorRgb.value.toRadixString(16).toUpperCase();
  }
}