Count every pixel into 256 bins per channel, with the luminance definition named rather than assumed: Rec. 709, Rec. 601 or CIE L*. Exports the whole table as RFC 4180 CSV.
Initializing in your browser…
Turn an image into a data URL whose payload is decoded again and compared byte for byte with the file, with the media type taken from the file's own signature rather than its extension and the size cost of embedding stated in full.
Compare two images with a perceptual engine (pixelmatch) that ignores anti-aliasing, or an exact byte engine. Groups changes into regions with bounding boxes, reports SSIM, and handles size mismatches with an explicit policy.
Whole-pixel crops with the rectangle typed or dragged, checked by decoding the output and comparing it with the pixels that went in. Quarter turns and mirrors are exact permutations, so nothing is clipped.
A 200 by 200 test image of four equal blocks: pure red, pure green, pure blue and mid grey, 10,000 pixels each.
Input
primaries.png · 40,000 pixels · luminance channel
Where the four blocks land
Rec. 709 blue 18 red 54 grey 128 green 182 Rec. 601 blue 29 red 76 grey 128 green 150 CIE L* blue 32 red 53 grey 54 green 88
The same four colours, counted three ways. Pure red is bin 54 under Rec. 709 and bin 76 under Rec. 601, a difference of 22 levels, and CIE L* puts grey and red almost on top of each other because it measures lightness rather than a weighted sum of stored values. A histogram can only show one of the three, which is why this one names the definition it is using.
Count the pixels of an image into 256 bins per channel and see the tonal distribution as a chart. The luminance definition is yours to choose (Rec. 709, Rec. 601 or CIE L*), each one named with the document it comes from, and fully transparent pixels are left out by default rather than counted as black.
See where the tones actually sit, with the mean quoted against the scale it is measured on.
Overlay the three channels and compare where each one peaks.
Find out how many pixels are fully transparent and keep them out of the counts, instead of reading a false spike of black.
Export every bin as CSV and analyse the distribution in a spreadsheet or a script.
Every pixel is read through the Canvas API and counted into 256 bins per channel. The counts are exact integers and nothing is sampled or downscaled: on a generated fixture whose contents are known in advance, the red, green and blue bins match Pillow's own Image.histogram() reading of the same file bin for bin.
The interesting part of a histogram is not the counting, it is the two decisions that are usually made silently. The first is what luminance means, and there is no single answer. Rec. 601 luma (ITU-R BT.601-7 table 3) weights the stored values 0.299, 0.587 and 0.114; those are the standard-definition television coefficients, and they are what Photoshop's Luminosity channel uses. Rec. 709 luma (ITU-R BT.709-6 item 3.2) weights them 0.2126, 0.7152 and 0.0722; sRGB uses the Rec. 709 primaries, so those are the coefficients that belong to the colours in the file. CIE L* undoes the sRGB transfer function first (IEC 61966-2-1), computes relative luminance Y in linear light, and converts it with CIE 15 clause 8.2.1.1, which is the only one of the three that is a luminance rather than a luma and the only one whose axis is perceptually even. Pure red lands at bin 76 under Rec. 601, bin 54 under Rec. 709 and L* 53. That is a spread of 22 levels on one colour, so the tool names the definition in use rather than calling any of them "the standard formula", and switching between them recounts without re-reading the file.
The second decision is transparency. A canvas stores premultiplied alpha, so a fully transparent pixel is handed back as black whatever colour the file records for it. Counting those pixels puts a spike at bin 0 of every channel exactly as tall as the number of transparent pixels, and not one of them is black in the file. The default is to leave them out and say how many there were; the other choice is offered beside it with what it does spelled out. On a test image of 20,000 red pixels with 2,000 of them fully transparent, counting them moves the mean luminance from 54.0 to 48.6.
Statistics come with the definition each one rests on. The median is a quantile, and there are nine definitions of a quantile in Hyndman and Fan (1996) that give different answers on the same data; all nine are offered and type 7 (R, NumPy, Excel PERCENTILE.INC) is the default. The mode is every bin that ties for the largest count, not the first one found. The clipping bands are the bottom and top 2 percent of the scale, and the page says that the width of a band is a choice rather than a measurement. The tonal split is in equal thirds of whichever scale the active channel uses, so an L* histogram is not divided at 85 and 170. Every reading is scoped to the pixels actually counted, and the page states whether the bins add up to that number.
The CSV export goes through an RFC 4180 writer: CRLF record separators per section 2.1, a header row naming the luminance definition, and one row per bin carrying red, green, blue, alpha and luma. A chart PNG and a statistics summary are also available. Everything happens in the browser and the picture is never uploaded.
Rec. 709 if you want the coefficients that belong to sRGB, which is what your file almost certainly is. Rec. 601 if you are comparing against Photoshop, whose Luminosity channel uses it. CIE L* if you want an axis where equal steps look equally different, which is the only one of the three that is a real luminance rather than a weighted sum of gamma-encoded values.
Because they are different quantities. Pure red is bin 76 under Rec. 601, bin 54 under Rec. 709 and L* 53. A histogram can only show one of them, so it should say which.
A canvas stores premultiplied alpha, so a fully transparent pixel comes back as (0, 0, 0) whatever colour the file records. By default those pixels are left out and the count is shown; you can also count them, and the page says that doing so puts a spike at bin 0 that is not a colour in the image.
A quantile of a finite sample is not uniquely defined. Hyndman and Fan (1996) set out nine definitions and different software picks different ones, so the tool names the one in use and lets you change it.
No, the histogram is a reading. Use the Image Filters or Colour Grader tools to change the picture.
Images are decoded, edited, and exported entirely inside this browser tab. No originals, exports, or metadata are uploaded.