fromColor function

String fromColor(
  1. Color? color
)

Implementation

String fromColor(Color? color) {
  if (color == null) return 'rgb(0,0,0)';
  return 'rgb(${(color.r * 255.0).round() & 0xff},${(color.g * 255.0).round() & 0xff},${(color.b * 255.0).round() & 0xff})';
}