color property

Color color

The color of the particle, calculated from its alpha, red, green, and blue properties.

Implementation

ui.Color get color {
  /// TODO: cache color transition if its not used.
  final a = (alpha * 0xff).toInt() << 24;
  final r = (red * 0xff).toInt() << 16;
  final g = (green * 0xff).toInt() << 8;
  final b = (blue * 0xff).toInt();
  return ui.Color(a + r + g + b);
//    (((a & 0xff) << 24) |
//    ((r & 0xff) << 16) |
//    ((g & 0xff) << 8)  |
//    ((b & 0xff) << 0)) & 0xFFFFFFFF;
}