Bulk Color Extractor: Colors of Many Images at Once
Pull the top 5 colors and the average color from up to 20 images in your browser. One row per image with its thumbnail, hex codes and shares. Export the table as CSV or JSON. Nothing is uploaded.
Drag images here, paste, or choose
Up to 20 images, 50 MB each and 200 MB in all. PNG, JPEG, GIF, BMP, WebP and AVIF files. Nothing is uploaded.
Need more than five colours from one picture? Use the color extractor.
About the Bulk Color Extractor
The Bulk Color Extractor reads a whole folder of pictures and gives you one row for each. A row shows the file name, a small thumbnail, the five most common colors with the share of the picture each one covers, and the average color of the picture. You can add up to 20 images at once, watch each one move from queued to done, and then save the whole table as a CSV file for a spreadsheet or as JSON for a script.
It reads PNG, JPEG, GIF, BMP, WebP and AVIF files up to 50 MB each and up to 200 MB in all. Your images never leave your device. Nothing is uploaded, there is no account, and every picture is read and counted by your own browser, one after another.
How to use it
Steps
- Choose images, drop them on the page or paste them. You can add more at any time until you reach 20 rows.
- Wait for each row to reach Done. The line above the list counts how many are finished, for example "2 of 3 done."
- Read the five colors and the average of each picture. Press the remove button on a row to drop one picture, or Clear all to start again.
- Press Download CSV or Download JSON to save the rows that finished.
If one file cannot be read, only its row shows the reason, such as an unsupported type or a file over the size limit. The other rows carry on. A fully transparent picture finishes as Done and says "No colors found."
How each row is worked out
Every picture is read at up to 1,000,000 pixels, so a very large photo is scaled down first. Pixels with an alpha value below 25 (almost fully transparent) never count. From the counted pixels the tool works out two things.
The average color is the plain mean of each sRGB channel, rounded to the nearest whole number:
where is the red, green or blue value and is the number of counted pixels. A picture that is half rgb(255, 0, 0) and half rgb(0, 0, 255) averages to , which rounds to #800080.
The top colors come from median cut on a histogram that keeps 5 bits of each channel. The tool splits the counted pixels into up to five boxes of similar colors, reports the mean color of each box, and gives each its share:
In the same red and blue picture the two colors are #ff0000 at 50.0 percent and #0000ff at 50.0 percent. Shares are rounded to one decimal place, so a row can add up to 99.9 or 100.1 percent. A picture with fewer than five distinct groups of colors lists fewer than five.
What the files contain
The CSV file is named colors.csv. Its first line is the header
file,average,colour_1,share_1,colour_2,share_2,colour_3,share_3,colour_4,share_4,colour_5,share_5
and each finished picture adds one line. The colors are hex codes and the shares are percentages with one decimal. Missing colors are left empty so every line has the same number of columns. A byte order mark is added at the start so Excel and other spreadsheets read file names with accents correctly.
A file name that contains a comma or a quote is wrapped in quotes with inner quotes doubled. A name that starts with =, +, - or @ gets a leading apostrophe, which stops a spreadsheet from running it as a formula.
The JSON file is named colors.json. It is a list with one object per picture, holding file, average and colors, where each color has a hex and a share.
Limits worth knowing
- Up to 20 images, 50 MB each and 200 MB together. If you add more than fit, the page says how many were added and how many were skipped.
- Pictures are processed one at a time, so a long list takes a little while but the page stays responsive.
- Only finished rows are exported. Rows that failed are left out of both files.
- Colors are numbers in sRGB as your browser shows them. The tool does not name colors, remove backgrounds or read embedded color profiles.
Related tools
To see more than five colors of a single picture, with sorting and ignore options, use the Color Extractor. To read one exact pixel, use the Image Color Picker. To resize or change the format of the same pictures first, try the Image Converter.
Frequently asked questions
Are my images uploaded anywhere?
No. Your images never leave your device. Each picture is read and counted by your browser, nothing is uploaded, and no account is needed.
How many images can I add?
Up to 20 images, each up to 50 MB, and up to 200 MB in total. PNG, JPEG, GIF, BMP, WebP and AVIF files work. If you add more than fit, the page tells you how many were added and how many were skipped, and the rows within the limits are kept.
What does each row show?
The file name, a thumbnail, the top five colors with their hex codes and the share of the picture each covers, and the average color of the picture. Each row also shows whether it is queued, processing or done.
How are the average and the top colors different?
The average is the mean of every counted pixel, so it can be a color that appears nowhere in the picture: half pure red and half pure blue average to #800080, a purple. The top colors are the groups of similar pixels that are really there, each with its share.
What happens if one file cannot be read?
Only its row shows the reason, for example an unsupported type or a file over 50 MB. The other pictures still finish. A fully transparent picture finishes as done and shows that no colors were found. Failed rows are left out of the CSV and JSON files.
What is in the CSV file?
The file is named colors.csv and starts with the header file, average, colour_1, share_1 and so on up to colour_5 and share_5. Each finished picture adds one line, with empty cells when it has fewer than five colors. File names with a comma or quote are quoted, and names that start with =, +, - or @ get a leading apostrophe so a spreadsheet does not run them as formulas.
Can I get the results as JSON?
Yes. Download JSON saves colors.json, a list with one object per picture holding file, average and colors, where each color has a hex code and a share.