SeedColorScheme extension

Extension on ColorScheme to provide a more flexible alternative to Flutter's Material 3 ColorScheme.fromSeed.

Use this extension to make a seeded ColorScheme using separate key colors for primary, secondary, tertiary, error, neutral and neutral variant color groups in ColorScheme.

By providing a FlexTones you can also customize tone mapping from tonal palettes to ColorScheme color and key color chroma usage per key color, used by the Material 3 tonal palette creation HCT (Hue-Chroma-Tone) color space algorithm.

As with ColorScheme.fromSeed, prefer using same key colors when seed generating your light and dark ColorScheme to create a balanced and matching light and dark scheme.

on

Static Methods

fromSeeds({Brightness brightness = Brightness.light, required Color primaryKey, Color? secondaryKey, Color? tertiaryKey, Color? errorKey, Color? neutralKey, Color? neutralVariantKey, FlexTones? tones, Color? primary, Color? onPrimary, Color? primaryContainer, Color? onPrimaryContainer, Color? secondary, Color? onSecondary, Color? secondaryContainer, Color? onSecondaryContainer, Color? tertiary, Color? onTertiary, Color? tertiaryContainer, Color? onTertiaryContainer, Color? error, Color? onError, Color? errorContainer, Color? onErrorContainer, Color? background, Color? onBackground, Color? surface, Color? onSurface, Color? surfaceVariant, Color? onSurfaceVariant, Color? outline, Color? outlineVariant, Color? shadow, Color? scrim, Color? inverseSurface, Color? onInverseSurface, Color? inversePrimary, Color? surfaceTint}) ColorScheme
Returns a ColorScheme from seed keys primaryKey, secondaryKey, tertiaryKey, errorKey, neutralKey and neutralVariantKey colors.