Color Palette from Image
Drop a screenshot, photo, or logo and get its dominant colors via median-cut quantization — hex and RGB swatches, CSS variables, a Tailwind snippet, and a quick WCAG contrast read. The image is processed on a local canvas and never leaves your browser.
Drop an image here, click to choose a file, or paste from the clipboard
PNG, JPG, WebP, GIF, SVG · processed locally — nothing is uploaded anywhere
Need to test more pairs or tweak lightness? Open the Color Converter for full WCAG checks on any color.
About this tool
The extractor downsamples your image to at most 200px on its longest side, then runs median-cut quantization on the pixels: the color space is repeatedly split along its widest channel until the requested number of clusters remains, and each cluster is averaged into one swatch. That is the same family of algorithm classic tools use for GIF palettes, so the result favors the colors that actually cover area — not just saturated outliers. Near-duplicate clusters are merged so you get genuinely distinct colors.
The theme hint samples the image border to guess the background color and tells you whether the image leans light or dark; the contrast card computes the real WCAG 2.1 relative-luminance ratio between the two most prominent colors.
Everything happens on a canvas in your browser — there is no server, no upload, and no tracking of the image or the extracted colors.