adaptive_palette 1.0.7
adaptive_palette: ^1.0.7 copied to clipboard
Dynamic theming from images for Flutter. Extract vibrant colors and create accessible Material Design 3 themes with Luma/Spotify-style blurred backgrounds.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.7 - 2025-11-18 #
Changed #
- Major Algorithm Improvement: Completely redesigned color scoring algorithm for superior dominant color detection
- Algorithm now adapts intelligently to different image types (colorful, monochromatic, normal)
- Increased default
quantizeColorsfrom 24 to 32 for better color detection accuracy - Increased default
resizefrom 96 to 128 for improved color extraction quality
Improved #
- Adaptive Intelligence: Automatically detects image characteristics and adjusts scoring weights
- Colorful images: Prioritizes population (55%) and chroma (30%)
- Monochromatic images: Focuses on population (65%), accepts grayscale colors
- Normal images: Balanced approach with 60% population, 25% chroma
- Perceptual Color Science: Now uses CAM16 chroma and HCT tone for human-eye-accurate color analysis
- Smart Filtering: Adaptive thresholds automatically adjust based on image type
- Aggressive filtering of backgrounds (blacks, whites) in colorful images
- Relaxed filtering for monochrome/grayscale images
- Color Diversity: Prevents selecting multiple shades of the same color
- Better Boosts: Conditional boosts for vibrant colors, mid-tones, and saturation only when relevant
Technical Details #
- Uses CAM16 perceptual color space for chroma and hue distance calculations
- Population-weighted scoring (55-65% depending on image type)
- Adaptive saturation thresholds (0.08 for monochrome, 0.12-0.18 for others)
- Perceptual color distance function prevents similar color selection
- All changes maintain full Flutter 3.0+ compatibility with bit operations
Performance #
- Optimized for real-world images: event photos, product shots, landscapes, UI screenshots, food photos
- Works correctly with dynamic image sources of varying characteristics
1.0.6 - 2025-11-18 #
Fixed #
- Critical Compatibility Fix: Replaced
toARGB32()method calls with.valueproperty for Flutter 3.0+ compatibility - Fixed compilation errors when using package with Flutter versions 3.0-3.26
- All color conversions now use stable
Color.valueAPI that works across all Flutter versions
Changed #
- Updated README requirements to accurately reflect Flutter SDK: >=3.0.0 (previously incorrectly stated >=3.9.2)
- Documentation now correctly shows support for Flutter 3.0 through current releases
Technical Details #
- Package now verified to work on Flutter 3.0+ through current versions
- All color operations use only stable, long-standing APIs
- Supports approximately 2 years of Flutter releases
1.0.5 - 2025-11-18 #
Fixed #
- Critical Fix: Replaced all color component getters with bit operations for universal compatibility
- Now uses
Color.valuewith bit masking (e.g.,(0x00ff0000 & c.value) >> 16for red channel) - Avoids both deprecated
.red/.green/.bluegetters and unsupported.r/.g/.bgetters - Fixed compilation errors on all Flutter versions from 3.0+ to current
- Color extraction and WCAG contrast calculations now work correctly across all supported Flutter versions
Technical Details #
- RGB components extracted directly from 32-bit color value using bit operations
- More performant (direct bit operations vs method calls)
- Future-proof implementation independent of Flutter API changes
1.0.4 - 2025-11-16 #
Changed #
- BREAKING IMPROVEMENT: Lowered minimum SDK requirement from
^3.9.2to>=3.0.0 <4.0.0 - Now supports Flutter 3.0+ and Dart 3.0+ (previously required Flutter 3.27+)
- Replaced
withValues()calls withwithOpacity()for backwards compatibility - Updated example app to use backwards-compatible API calls
Fixed #
- Compatibility with older Flutter versions (Flutter 3.0 through current)
- Removed Flutter 3.27+ specific API usage
1.0.3 - 2025-11-14 #
Changed #
- Upgraded
flutter_lintsfrom ^5.0.0 to ^6.0.0 for latest linting rules - Cleaned up
pubspec.yamlby removing unnecessary comments - Improved code formatting and consistency across library files
- Updated README installation instructions to reference version 1.0.3
Fixed #
- Minor code formatting improvements for better readability
- Consistent code style throughout the package
1.0.2 - 2025-11-12 #
Added #
- Complete example app in
example/directory for pub.dev - Simple example demonstrating minimal usage
- Full-featured example with blurred backgrounds and color palette display
- Example README with usage instructions
1.0.1 - 2025-11-11 #
Changed #
- Updated README.md to accurately reflect actual codebase
- Removed references to non-existent example directory and widgets
- Added complete working app examples based on actual implementation
- Updated API documentation with correct default values
- Improved documentation clarity and accuracy
1.0.0 - 2025-11-11 #
Added #
- Initial release of Adaptive Palette
- Automatic color palette extraction from images using CAM16/HCT color space
- WCAG AA/AAA contrast compliance for all generated themes
- Smooth theme animations with PaletteScope
- High-performance median-cut quantization algorithm
- Smart LRU caching with content-based keys
- AdaptiveBlurredBackground widget (Luma/Spotify-style)
- AdaptiveBlurredBackgroundWithImage widget variant
- Dark and light theme support
- Material Design 3 integration
- Comprehensive inline documentation
- Example app with image gallery
Features #
- Extract vibrant, muted, or dominant color strategies
- Configurable blur, scale, and overlay effects
- Cross-fade transitions between themes
- Hero animations for smooth page transitions
- Responsive image loading with error handling
- Accessibility-first design principles
Performance #
- ~50-150ms palette extraction time
- <1ms cache hit latency
- 60 FPS smooth animations
- Memory-efficient downsampling