Creates a color palette based on the colors in an image.
Image
— The image to analyze.Colors
— How many colors to output, limited to 256.Palette
— The list of colors found in the image.This node uses Xiaolin Wu’s 1991 algorithm (“greedy orthogonal bipartition of RGB space for variance minimization”) to pick a set of colors that represents the overall image.
For example, given this image:
This node would produce the following 4-color palette:
Or the following 32-color palette:
All output colors are opaque; transparent colors in the input image are treated as though they are composited onto an opaque black background.
Thanks to Gisle Martens Meyer for funding development of this node!
Keywords: 1980s, 1990s, RGB partition, WuQuant, Xiaolin Wu, alias, banding, clustering, contour, create, depth, edge, generate, gif, gradient, quantize, raster, reduce, representative, retro, variance minimization