How to use the Flutter Color Palette
- Enter a hex color or use the color picker.
- Review the generated shades in the preview.
- Copy the MaterialColor or ThemeData code into your Flutter theme file.
Features
- Hex → MaterialColor with 10 shades (50–900)
- Material 3 ColorScheme.fromSeed and ThemeData snippet
- Live swatch preview with hex values
- Color(0xFF…) constant output ready for Dart
Frequently asked questions
Why do I need a MaterialColor instead of a Color?
Older APIs such as ThemeData(primarySwatch:) require a MaterialColor — a Color with 10 named shades. With Material 3 you usually pass a seed color to ColorScheme.fromSeed instead; this tool generates both.
How are the shades calculated?
Lighter shades (50–400) are mixed toward white and darker shades (600–900) toward black, with 500 being your exact color — matching how Material Design swatches are structured.