randomLightColor function

Color randomLightColor({
  1. int mode = -1,
})

Returns a random light color. The mode can be optionally specified, which has to be either 1 (for one-primary) or 2 (for two-primary). Any other value will result in a random mode.

Implementation

Color randomLightColor({int mode = -1}) {
  Color dark = RandomColor().getRandomDarkColor();
  int r = 255 - dark.red;
  int g = 255 - dark.green;
  int b = 255 - dark.blue;

  return Color.fromARGB(255, r, g, b);
}