{"inline_daily":{"image-color-palette-extractor":{"uploaded_image":"Uploaded image","drop_or_choose":"Drop an image here or click to choose one","click_to_replace":"Click the image to replace it.","number_of_colors":"Number of colours","privacy_note":"Your image never leaves your browser: the analysis runs locally and nothing is sent to a server.","error_not_image":"This file is not an image. Choose a PNG, JPEG, WebP or GIF.","error_load":"This image could not be read.","error_empty":"No colour to extract: the image is fully transparent.","no_palette_yet":"The palette will appear here once you upload an image.","copy_value":"Copy this value","export_format":"Export format","css_variables":"CSS variables","copy_code":"Copy"}},"docs_daily":{"tools":{"image-color-palette-extractor":{"content":{"title":"How to extract colours from an image","intro":"To extract the dominant colours of an image, it is shrunk, its pixels are read and then grouped by median cut: the most populated group of pixels is sorted along its widest channel (red, green or blue), split at the median pixel, and each group is averaged into one colour. The tool returns 5 to 10 colours with their percentage.","details":"
An image made of 50 red pixels, 30 blue pixels and 20 transparent ones gives two colours: #ff0000 at 62.5% and #0000ff at 37.5%, the transparent pixels not being counted.
CSS variables (--palette-1: #ff0000;), Tailwind configuration and a JSON array with HEX, RGB, HSL and percentage.
The resulting colour is an average: it may match no pixel exactly. A high-contrast photo with few groups loses detail; raise the number of colours for more nuance. Processing is local, the image is never uploaded.
Sources and dates: the median cut algorithm was described by Paul Heckbert in \"Color Image Quantization for Frame Buffer Display\", ACM SIGGRAPH Computer Graphics, vol. 16, no. 3, July 1982, pp. 297-307. The tool applies a simple variant (the most populated group is split at the median pixel of its widest channel). The RGB to HSL formulas are the classic conversion formulas, with values rounded to integers (checked on 14/10/2026)
"},"faqs":[{"question":"How do I extract colours from an image?","answer":"Upload the image to the tool: it is shrunk then analysed with median cut, which returns 5 to 10 dominant colours with their percentage. Copy them as HEX, RGB or HSL."},{"question":"Is my image uploaded to a server?","answer":"No. Your browser reads and analyses the image through a canvas, with no network request at all. It is gone from memory as soon as you close the page."},{"question":"How do I get the HEX code of a colour in a photo?","answer":"Run the analysis, then copy the HEX value of the shade you want, for example #3a7bd5. For the exact colour of one pixel, use an eyedropper instead; here each colour is the average of a group of pixels."}]}}}}