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

buildDynamicScheme({required Brightness brightness, required FlexSchemeVariant variant, required Color primarySeedColor, Color? secondarySeedColor, Color? tertiarySeedColor, Color? errorSeedColor, Color? neutralSeedColor, Color? neutralVariantSeedColor, double contrastLevel = 0.0, bool useExpressiveOnContainerColors = false, bool respectMonochromeSeed = false}) DynamicScheme

Available on ColorScheme, provided by the SeedColorScheme extension

Build one of the Flutter SDK defined DynamicScheme variants.
fromSeeds({Brightness brightness = Brightness.light, required Color primaryKey, Color? secondaryKey, Color? tertiaryKey, Color? errorKey, Color? neutralKey, Color? neutralVariantKey, FlexTones? tones, FlexSchemeVariant? variant, double contrastLevel = 0.0, bool useExpressiveOnContainerColors = false, bool respectMonochromeSeed = false, Color? primary, Color? onPrimary, Color? primaryContainer, Color? onPrimaryContainer, Color? primaryFixed, Color? primaryFixedDim, Color? onPrimaryFixed, Color? onPrimaryFixedVariant, Color? secondary, Color? onSecondary, Color? secondaryContainer, Color? onSecondaryContainer, Color? secondaryFixed, Color? secondaryFixedDim, Color? onSecondaryFixed, Color? onSecondaryFixedVariant, Color? tertiary, Color? onTertiary, Color? tertiaryContainer, Color? onTertiaryContainer, Color? tertiaryFixed, Color? tertiaryFixedDim, Color? onTertiaryFixed, Color? onTertiaryFixedVariant, Color? error, Color? onError, Color? errorContainer, Color? onErrorContainer, Color? surface, Color? surfaceDim, Color? surfaceBright, Color? surfaceContainerLowest, Color? surfaceContainerLow, Color? surfaceContainer, Color? surfaceContainerHigh, Color? surfaceContainerHighest, Color? onSurface, Color? onSurfaceVariant, Color? outline, Color? outlineVariant, Color? shadow, Color? scrim, Color? inverseSurface, Color? onInverseSurface, Color? inversePrimary, Color? surfaceTint, Color? background, Color? onBackground, Color? surfaceVariant}) ColorScheme

Available on ColorScheme, provided by the SeedColorScheme extension

Returns a ColorScheme from seed keys primaryKey, secondaryKey, tertiaryKey, errorKey, neutralKey and neutralVariantKey colors.