palette_generator_plus 1.0.0 copy "palette_generator_plus: ^1.0.0" to clipboard
palette_generator_plus: ^1.0.0 copied to clipboard

Extract prominent colors from images. A maintained palette_generator successor.

1.0.0 #

Initial release of palette_generator_plus, the community-maintained successor to the discontinued palette_generator package (see flutter/flutter#162963).

Migrating from palette_generator #

Migration is a single import-line change:

- import 'package:palette_generator/palette_generator.dart';
+ import 'package:palette_generator_plus/palette_generator_plus.dart';

The entire original public API (PaletteGenerator, PaletteColor, PaletteTarget, PaletteFilter, EncodedImage, avoidRedBlackWhitePaletteFilter) is preserved with identical names and signatures.

Added #

  • Isolate-based extraction (runInIsolate, on by default) with a transparent main-thread fallback on the web.
  • A pluggable Quantizer interface with CelebiQuantizer (default, backed by material_color_utilities) and LegacyQuantizer (the original median-cut, for byte-identical legacy output).
  • A Material 3 bridge: PaletteGenerator.seedColor and PaletteGenerator.toColorScheme().
  • WCAG accessibility helpers: contrastRatio, wcagTextColor, WcagLevel, and PaletteColor.accessibleOnColor.

Changed #

  • Colors are now extracted with the CelebiQuantizer by default. Pass quantizer: const LegacyQuantizer() to any from* constructor for output that is byte-identical to the original palette_generator.
1
likes
160
points
853
downloads

Documentation

API reference

Publisher

verified publisherkerembas.com.tr

Weekly Downloads

Extract prominent colors from images. A maintained palette_generator successor.

Repository (GitHub)
View/report issues

Topics

#color #palette #theming #material #image

License

BSD-3-Clause (license)

Dependencies

collection, flutter, material_color_utilities, meta

More

Packages that depend on palette_generator_plus