yellow constant

MaterialColor const yellow

The yellow primary color and swatch.

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

See also:

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

Implementation

// TODO(framework): Add unit tests to this code snippet.
// https://github.com/flutter/flutter/issues/188530
///
/// ```dart
/// Icon(
///   Icons.widgets,
///   color: Colors.yellow[400],
/// )
/// ```
///
/// </callout-box>
///
/// See also:
///
///  * [yellowAccent], the corresponding accent colors.
///  * [lime] and [amber], similar colors.
///  * [Theme.of], which allows you to select colors from the current theme
///    rather than hard-coding colors in your build methods.
static const MaterialColor yellow = MaterialColor(_yellowPrimaryValue, <int, Color>{
  50: Color(0xFFFFFDE7),
  100: Color(0xFFFFF9C4),
  200: Color(0xFFFFF59D),
  300: Color(0xFFFFF176),
  400: Color(0xFFFFEE58),
  500: Color(_yellowPrimaryValue),
  600: Color(0xFFFDD835),
  700: Color(0xFFFBC02D),
  800: Color(0xFFF9A825),
  900: Color(0xFFF57F17),
});