toRgb method

  1. @Deprecated('Use toRgb2 instead')
List<int> toRgb()

Converts a Flutter Color object to RGB (0-255) values.

Returns a list of integers representing the RGB values. r, g, b

Implementation

@Deprecated('Use toRgb2 instead')
List<int> toRgb() {
  final List<double> rgb = ColorConverter.color2rgb2(this);

  return [
    (rgb[0] * 255).round(),
    (rgb[1] * 255).round(),
    (rgb[2] * 255).round(),
  ];
}