3 ms·
Nice tool. Looking at devtools, it generates a gradient in each direction (left, right, top, bottom). Each of these gradients is a single color transitioning fr
by mmahemoff 11y ago
Nice tool. Looking at devtools, it generates a gradient in each direction (left, right, top, bottom). Each of these gradients is a single color transitioning from fully-transparent to fully-opaque.
The algorithm looks to be breaking the image into the 4 quadrants and finding the dominant color in each quadrant (eliminating any shades that are too gray). e.g. to get the color for the left-to-right gradient, it finds the most dominant color on the right of the image.