color_extract library

Classes

ColorAverager
This widget calculates the average color of the overlapping area between its child and a specified ColorExtractor or RepaintBoundary widget, identified by its GlobalKey boundaryKey.
ColorAveragerController
Controller class for ColorAverager.
ColorExtractor
A widget that wraps its child with a RepaintBoundary widget and provides a GlobalKey to the boundary. This allows you to extract the colors from the widget using ColorAverager.
GrayscaleFilter
A widget that applies a grayscale filter to its child.

Extensions

ColorExt on Color
An extension on the Color class that provides additional functionality.

Functions

abgrToArgb(int argbColor) int
Converts an ABGR color format to ARGB by swapping R and B values.
enforceColor(Color color, [double percent = 0.2]) Color
Returns a color that is closer to the specified color, with a brightness value that is adjusted by percent.
getRandomColor() Color
Returns a random color generated using the dart:math library. The color has an alpha value of 255 and random red, green, and blue values.
moreVisibleColor(Color foregroundColor, Color backgroundColor, [double percent = 0.4]) Color
Returns a color that is more visible against the specified background color.
reverseColor(Color color) Color
Inverts the RGB values of the input color and sets the alpha value to 255 (fully opaque) to produce the resulting color. The input color should have an alpha value of 255.