Skip to main content

[Release] color_palette_plus v2.0.0 - Supercharged Material 3 Theme Generation 🎨

Published 2 min readMarkdown

Hey Flutter devs! I'm excited to announce the release of version 2.0.0 of color_palette_plus, a comprehensive Flutter library for color palette generation and theme management. This major update brings powerful Material 3 theme generation capabilities and a more robust color handling system.

What's New in 2.0.0?

🎯 Theme Generation

  • New ThemeGenerator class for automatic theme generation following Material 3 guidelines

  • Support for both light and dark themes with ThemePair

  • Advanced theme customization through ThemeConfig

  • Comprehensive color role system aligned with Material 3 specifications

🌈 Color Harmonies

  • Monochromatic palettes for subtle, sophisticated looks

  • Analogous color schemes for harmonious, unified designs

  • Complementary colors for strong visual contrast

  • Customizable harmony configurations (steps, angles, etc.)

âš¡ Improved Color Handling

  • Enhanced color transformation algorithms

  • Better contrast ratios in generated shades

  • Optimized HSL adjustments for natural color variations

  • Type-safe and null-safe implementation

Features Overview

// Generate a complete theme
final theme = ThemeGenerator.generateTheme(
  baseColor,
  config: ThemeConfig(
    colorSchemeConfig: ColorSchemeConfig(
      harmonyType: HarmonyType.analogous,
      analogousAngle: 30,
      harmonySteps: 5,
    ),
  ),
);

// Generate both light and dark themes
final themePair = ThemeGenerator.generateThemePair(baseColor);

// Create color harmonies
final monochromaticColors = ColorPalettes.monochromatic(baseColor, steps: 5);
final analogousColors = ColorPalettes.analogous(baseColor, angle: 30);
final complementaryColors = ColorPalettes.complementary(baseColor);

Try It Out!

Check out our live demo to see the library in action!

Installation

Add to your pubspec.yaml:

dependencies:
  color_palette_plus: ^2.0.0

Breaking Changes

  • Updated theme generation API to use new configuration classes

  • Revised color role system to match Material 3 specifications

We'd love to hear your feedback and suggestions for future improvements! Feel free to open issues or contribute on GitHub. Happy coding! 🚀

#flutter #dart #material3 #flutterdev #design

180 views

One thing I’d be interested in is how the generated themes behave with highly saturated brand colors. For example, imagine a fintech app using #FF3D00 as its primary brand color. In a transaction history screen, that color might work well for selected filters or prominent actions, but using it across primaryContainer, charts, and dark-mode surfaces could create some pretty awkward contrast combinations.

Since Material 3 has specific color roles and tonal surface levels, do you plan to support contrast-level configuration or automated contrast validation for custom colorOverrides? It’d be useful to know whether the generator adjusts the surrounding tones to preserve readability or leaves that responsibility to the developer.