purple constant Null safety

MaterialColor const purple

The purple primary color and swatch.

Icon(
  Icons.widgets,
  color: Colors.purple[400],
)

See also:

  • purpleAccent, the corresponding accent colors.
  • deepPurple and pink, similar colors.
  • Theme.of, which allows you to select colors from the current theme rather than hard-coding colors in your build methods.

Implementation

static const MaterialColor purple = MaterialColor(
  _purplePrimaryValue,
  <int, Color>{
     50: Color(0xFFF3E5F5),
    100: Color(0xFFE1BEE7),
    200: Color(0xFFCE93D8),
    300: Color(0xFFBA68C8),
    400: Color(0xFFAB47BC),
    500: Color(_purplePrimaryValue),
    600: Color(0xFF8E24AA),
    700: Color(0xFF7B1FA2),
    800: Color(0xFF6A1B9A),
    900: Color(0xFF4A148C),
  },
);