image_color_backdrop 0.1.0
image_color_backdrop: ^0.1.0 copied to clipboard
Extracts the dominant, vibrant or muted color from an image, icon or logo and turns it into a background color with opacity, tint, contrast and gradient controls.
Changelog #
All notable changes to this package are documented here. The format follows Keep a Changelog and the package adheres to Semantic Versioning.
0.1.0 #
Initial release.
Added #
ImageBackdrop: a container whose background color is picked from an image, withImageBackdrop.imagefor the common "image on its own color" case, gradients, rounded corners, shadows, animated color changes and automatic readable text/icon colors.BackdropColorBuilder: hands the picked color (BackdropResult) to any widget you build.BackdropController: aChangeNotifierto share the color across widgets and re-style it live.ImageColorBackdropand theImageProvider.backdropColor()/backdropPalette()extensions: a plainFutureAPI without widgets.BackdropStylewithopacity,brightness,saturation,blendColor,blendAmountandensureContrastWith, plus the presetsoriginal,soft,pastel,deepandsubdued.BackdropOptionswith six color strategies (dominant,vibrant,muted,average,lightest,darkest), sampled regions (whole,center,edges, quarters and custom rectangles),ignoreNearWhite,ignoreNearBlack, transparency threshold and sampling size.- Pure Dart histogram + median cut
ColorQuantizer, an in-memory LRUBackdropCache, request de-duplication, andBackdropColorUtils(contrast ratio, readable foreground, lighten/darken). - Example app with a gallery, a live playground and "use the color elsewhere" demos.
