Random Color Scheme app icon

Random Color Scheme

Discover your next Flutter theme on every hot reload.

Generate full Material 3 colour schemes from vibrant random seeds across chromatic variants, preview them in light and dark, and copy the Dart code you want to keep.

Try the live demo ↗

Shuffling through colourful light and dark Material 3 schemes.

Usage

pub package

dependencies:
  random_color_scheme: ^0.1.6

Drop randomColorSchemeDark() or randomColorSchemeLight() into your ThemeData:

import 'package:material_ui/material_ui.dart';
import 'package:random_color_scheme/random_color_scheme.dart';

ThemeData(
  colorScheme: randomColorSchemeDark(),
)

Pass seed to lock a palette, variant to pin a DynamicSchemeVariant, or contrastLevel (0.0, 0.5, 1.0) to adjust contrast. When shouldPrint is true, the generated ColorScheme.fromSeed(...) call is printed to your console so you can paste it back once you find a keeper.

  • randomColorScheme({int? seed, bool isDark = true, DynamicSchemeVariant? variant, double contrastLevel = 0.0, bool shouldPrint = true}): ColorScheme
  • randomColorSchemeDark({int? seed, DynamicSchemeVariant? variant, double contrastLevel = 0.0, bool shouldPrint = true}): ColorScheme
  • randomColorSchemeLight({int? seed, DynamicSchemeVariant? variant, double contrastLevel = 0.0, bool shouldPrint = true}): ColorScheme
  • resolveDynamicSchemeSeed({int? seed, DynamicSchemeVariant? variant}): DynamicSchemeSeed

Example

Expressive variant rendered across live Material 3 cards. Dark appearance with Fruit Salad variant.
git clone https://github.com/bernaferrari/RandomColorScheme.git
cd RandomColorScheme/example
flutter pub get
flutter run -d chrome

Random Color Scheme is open source under the MIT license.