Flutter Material 3 color scheme generator
Enter a seed colour and get a Material 3 ColorScheme built with the HCT tonal-palette algorithm: ColorScheme.fromSeed, the explicit ColorScheme with every role, Compose colours and CSS custom properties. The contrast of each on-colour is shown beside it.
Updated
Seed colour in HCT
H 299.0 C 47.9 T 40.1
#6750A4, tonalSpot (Flutter default), 49 roles per brightness
Flutter ColorScheme
// 1) One line. Flutter generates the roles for you: final lightScheme = ColorScheme.fromSeed( seedColor: const Color(0xFF6750A4), brightness: Brightness.light, ); final darkScheme = ColorScheme.fromSeed( seedColor: const Color(0xFF6750A4), brightness: Brightness.dark, ); // 2) The same roles written out, so they never shift when Flutter updates its algorithm: const lightColorScheme = ColorScheme( brightness: Brightness.light, primary: Color(0xFF65558F), onPrimary: Color(0xFFFFFFFF), primaryContainer: Color(0xFFE9DDFF), onPrimaryContainer: Color(0xFF4D3D75), primaryFixed: Color(0xFFE9DDFF), primaryFixedDim: Color(0xFFCFBDFE), onPrimaryFixed: Color(0xFF201047), onPrimaryFixedVariant: Color(0xFF4D3D75), secondary: Color(0xFF625B71), onSecondary: Color(0xFFFFFFFF), secondaryContainer: Color(0xFFE8DEF8), onSecondaryContainer: Color(0xFF4A4458), secondaryFixed: Color(0xFFE8DEF8), secondaryFixedDim: Color(0xFFCBC2DB), onSecondaryFixed: Color(0xFF1E192B), onSecondaryFixedVariant: Color(0xFF4A4458), tertiary: Color(0xFF7E5260), onTertiary: Color(0xFFFFFFFF), tertiaryContainer: Color(0xFFFFD9E3), onTertiaryContainer: Color(0xFF633B48), tertiaryFixed: Color(0xFFFFD9E3), tertiaryFixedDim: Color(0xFFEFB8C8), onTertiaryFixed: Color(0xFF31101D), onTertiaryFixedVariant: Color(0xFF633B48), error: Color(0xFFBA1A1A), onError: Color(0xFFFFFFFF), errorContainer: Color(0xFFFFDAD6), onErrorContainer: Color(0xFF93000A), surface: Color(0xFFFDF7FF), onSurface: Color(0xFF1D1B20), surfaceDim: Color(0xFFDED8E0), surfaceBright: Color(0xFFFDF7FF), surfaceContainerLowest: Color(0xFFFFFFFF), surfaceContainerLow: Color(0xFFF8F2FA), surfaceContainer: Color(0xFFF2ECF4), surfaceContainerHigh: Color(0xFFECE6EE), surfaceContainerHighest: Color(0xFFE6E0E9), onSurfaceVariant: Color(0xFF49454E), outline: Color(0xFF7A757F), outlineVariant: Color(0xFFCAC4CF), shadow: Color(0xFF000000), scrim: Color(0xFF000000), inverseSurface: Color(0xFF322F35), onInverseSurface: Color(0xFFF5EFF7), inversePrimary: Color(0xFFCFBDFE), surfaceTint: Color(0xFF65558F), ); const darkColorScheme = ColorScheme( brightness: Brightness.dark, primary: Color(0xFFCFBDFE), onPrimary: Color(0xFF36275D), primaryContainer: Color(0xFF4D3D75), onPrimaryContainer: Color(0xFFE9DDFF), primaryFixed: Color(0xFFE9DDFF), primaryFixedDim: Color(0xFFCFBDFE), onPrimaryFixed: Color(0xFF201047), onPrimaryFixedVariant: Color(0xFF4D3D75), secondary: Color(0xFFCBC2DB), onSecondary: Color(0xFF332D41), secondaryContainer: Color(0xFF4A4458), onSecondaryContainer: Color(0xFFE8DEF8), secondaryFixed: Color(0xFFE8DEF8), secondaryFixedDim: Color(0xFFCBC2DB), onSecondaryFixed: Color(0xFF1E192B), onSecondaryFixedVariant: Color(0xFF4A4458), tertiary: Color(0xFFEFB8C8), onTertiary: Color(0xFF4A2532), tertiaryContainer: Color(0xFF633B48), onTertiaryContainer: Color(0xFFFFD9E3), tertiaryFixed: Color(0xFFFFD9E3), tertiaryFixedDim: Color(0xFFEFB8C8), onTertiaryFixed: Color(0xFF31101D), onTertiaryFixedVariant: Color(0xFF633B48), error: Color(0xFFFFB4AB), onError: Color(0xFF690005), errorContainer: Color(0xFF93000A), onErrorContainer: Color(0xFFFFDAD6), surface: Color(0xFF141218), onSurface: Color(0xFFE6E0E9), surfaceDim: Color(0xFF141218), surfaceBright: Color(0xFF3B383E), surfaceContainerLowest: Color(0xFF0F0D13), surfaceContainerLow: Color(0xFF1D1B20), surfaceContainer: Color(0xFF211F24), surfaceContainerHigh: Color(0xFF2B292F), surfaceContainerHighest: Color(0xFF36343A), onSurfaceVariant: Color(0xFFCAC4CF), outline: Color(0xFF948F99), outlineVariant: Color(0xFF49454E), shadow: Color(0xFF000000), scrim: Color(0xFF000000), inverseSurface: Color(0xFFE6E0E9), onInverseSurface: Color(0xFF322F35), inversePrimary: Color(0xFF65558F), surfaceTint: Color(0xFFCFBDFE), );
| Pair | Brightness | Colours | Ratio | Meets |
|---|---|---|---|---|
| onPrimary on primary | light | #FFFFFF on #65558F | 6.46:1 | AA text |
| onPrimaryContainer on primaryContainer | light | #4D3D75 on #E9DDFF | 7.25:1 | AAA text |
| onSecondary on secondary | light | #FFFFFF on #625B71 | 6.45:1 | AA text |
| onSecondaryContainer on secondaryContainer | light | #4A4458 on #E8DEF8 | 7.18:1 | AAA text |
| onTertiary on tertiary | light | #FFFFFF on #7E5260 | 6.43:1 | AA text |
| onTertiaryContainer on tertiaryContainer | light | #633B48 on #FFD9E3 | 7.23:1 | AAA text |
| onError on error | light | #FFFFFF on #BA1A1A | 6.46:1 | AA text |
| onErrorContainer on errorContainer | light | #93000A on #FFDAD6 | 7.23:1 | AAA text |
| onSurface on surface | light | #1D1B20 on #FDF7FF | 16.20:1 | AAA text |
| onSurfaceVariant on surface | light | #49454E on #FDF7FF | 8.87:1 | AAA text |
| onInverseSurface on inverseSurface | light | #F5EFF7 on #322F35 | 11.65:1 | AAA text |
| outline on surface | light | #7A757F on #FDF7FF | 4.25:1 | 3:1 (large text, icons, borders) |
| outlineVariant on surface | light | #CAC4CF on #FDF7FF | 1.61:1 | below 3:1 |
| onPrimary on primary | dark | #36275D on #CFBDFE | 7.70:1 | AAA text |
| onPrimaryContainer on primaryContainer | dark | #E9DDFF on #4D3D75 | 7.25:1 | AAA text |
| onSecondary on secondary | dark | #332D41 on #CBC2DB | 7.71:1 | AAA text |
| onSecondaryContainer on secondaryContainer | dark | #E8DEF8 on #4A4458 | 7.18:1 | AAA text |
| onTertiary on tertiary | dark | #4A2532 on #EFB8C8 | 7.71:1 | AAA text |
| onTertiaryContainer on tertiaryContainer | dark | #FFD9E3 on #633B48 | 7.23:1 | AAA text |
| onError on error | dark | #690005 on #FFB4AB | 7.71:1 | AAA text |
| onErrorContainer on errorContainer | dark | #FFDAD6 on #93000A | 7.23:1 | AAA text |
| onSurface on surface | dark | #E6E0E9 on #141218 | 14.34:1 | AAA text |
| onSurfaceVariant on surface | dark | #CAC4CF on #141218 | 10.89:1 | AAA text |
| onInverseSurface on inverseSurface | dark | #322F35 on #E6E0E9 | 10.16:1 | AAA text |
| outline on surface | dark | #948F99 on #141218 | 5.88:1 | AA text |
| outlineVariant on surface | dark | #49454E on #141218 | 1.98:1 | below 3:1 |
- Generated with the algorithm of material-color-utilities (2021 colour spec, contrast level 0, the family Flutter's fromSeed follows). Flutter pins its own copy of that library, so an older Flutter can differ in a few roles (the light on-container tones changed from 10 to 30).
How does a seed colour become a Material 3 ColorScheme?
Material 3 does not shade your colour lighter and darker in RGB. It converts the seed to HCT, a space built from CAM16 hue and chroma plus the L* lightness (tone) of CIELAB. Hue is the colour family, chroma is how colourful it is, and tone runs from 0 (black) to 100 (white). Because tone is perceptual, two colours with the same tone and different hues look equally light, which is what makes text on a coloured background predictable.
From the seed's hue the generator builds five tonal palettes. In the default tonalSpot variant: primary at chroma 36 on the seed's hue, secondary at chroma 16, tertiary at chroma 24 with the hue turned 60 degrees, neutral at chroma 6 and neutral variant at chroma 8. A fixed error palette sits at hue 25, chroma 84. Each palette is asked for a colour at a given tone, and where that hue cannot reach the requested chroma at that tone, the solver returns the most colourful in-gamut sRGB colour it can.
Roles are then fixed tones from those palettes. In the light scheme primary is tone 40 and onPrimary tone 100, primaryContainer is 90 and onPrimaryContainer 30; in the dark scheme they are 80, 20, 30 and 90. Surfaces come from the neutral palette: surface 98 (light) or 6 (dark), and the five surface container roles step from 100 to 90 in light and 4 to 22 in dark. Because the tones are fixed, a colour keeps the same contrast with its on-colour whatever the seed.
The seed itself usually does not appear in the scheme. A strong red seed gives a muted, pastel-leaning primary, since tonalSpot caps chroma. That is intended; use the vibrant variant for a primary that stays close to the seed's saturation.
seed -> HCT (hue, chroma, tone)
palette(variant, hue) -> TonalPalette(hue, chroma)
role = palette.tone(t) light primary t=40, onPrimary 100, container 90, onContainer 30
dark primary t=80, onPrimary 20, container 30, onContainer 90Which tone does each Material 3 role use?
| Role | Palette | Light tone | Dark tone |
|---|---|---|---|
| primary / secondary / tertiary | its own | 40 | 80 |
| onPrimary (and on-secondary, on-tertiary) | its own | 100 | 20 |
| primaryContainer | primary | 90 | 30 |
| onPrimaryContainer (and the secondary, tertiary and error versions) | its own | 30 | 90 |
| primaryFixed / primaryFixedDim | primary | 90 / 80 | 90 / 80 (same in dark) |
| error / onError / errorContainer | error | 40 / 100 / 90 | 80 / 20 / 30 |
| surface | neutral | 98 | 6 |
| surfaceContainerLowest to Highest | neutral | 100, 96, 94, 92, 90 | 4, 10, 12, 17, 22 |
| surfaceDim / surfaceBright | neutral | 87 / 98 | 6 / 24 |
| onSurface | neutral | 10 | 90 |
| onSurfaceVariant | neutral variant | 30 | 80 |
| outline / outlineVariant | neutral variant | 50 / 80 | 60 / 30 |
| inverseSurface / onInverseSurface | neutral | 20 / 95 | 90 / 20 |
| inversePrimary | primary | 80 | 40 |
| scrim / shadow | neutral | 0 | 0 |
How to generate a Material 3 ColorScheme from a seed colour
- 1Enter the seedType a HEX colour or pick one. This is your brand colour or the colour you want the app to lean toward.
- 2Choose the variant and brightnessKeep tonalSpot to match ColorScheme.fromSeed. Pick light, dark or both; with both you get two schemes you can pass to ThemeData and darkTheme.
- 3Add your own secondary and tertiary seeds if you have themTick the box and enter them. The output then uses the explicit ColorScheme, since fromSeed takes a single seed.
- 4Check the contrast table and copyRead the ratios under the preview, then copy the Dart, Compose or CSS output. Paste the Dart into your theme file and pass the schemes to ThemeData(colorScheme: ...).
Frequently asked questions
Will this match what ColorScheme.fromSeed gives in my Flutter app?
Why is my primary colour not my seed colour?
What is the difference between HCT and HSL?
How do I use the dark scheme in Flutter?
What are the surfaceContainer roles for?
Can I use these colours in Jetpack Compose and on the web too?
Sources
- material-foundation/material-color-utilities, HCT, tonal palettes and dynamic schemes (npm @material/material-color-utilities 0.4.0 read) (checked 11 Nov 2026)
- Flutter API: ColorScheme.fromSeed, defaults dynamicSchemeVariant tonalSpot, contrastLevel 0 (checked 11 Nov 2026)
- Material Design 3: color roles (checked 11 Nov 2026)
- WCAG 2.2 relative luminance and contrast ratio (W3C Recommendation) (checked 11 Nov 2026)
Need a custom dev tool for your team?
We build internal tools, dashboards, APIs, and SaaS platforms. If you can describe it, we can ship it.
Built by CountryDevs · No signup · No ads · We count visits, never what you enter