palette_generator_plus 1.0.0
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
Quantizerinterface withCelebiQuantizer(default, backed bymaterial_color_utilities) andLegacyQuantizer(the original median-cut, for byte-identical legacy output). - A Material 3 bridge:
PaletteGenerator.seedColorandPaletteGenerator.toColorScheme(). - WCAG accessibility helpers:
contrastRatio,wcagTextColor,WcagLevel, andPaletteColor.accessibleOnColor.
Changed #
- Colors are now extracted with the
CelebiQuantizerby default. Passquantizer: const LegacyQuantizer()to anyfrom*constructor for output that is byte-identical to the originalpalette_generator.