Build an 8×4 opaque PNG with 16 red pixels, 8 green pixels, 4 blue pixels and 4 yellow pixels. Because the image has fewer than 40,000 pixels, every pixel is sampled. The four exact colors lie in four different four-bit RGB buckets, so the palette should list red first at 50%, green second at 25%, then blue and yellow at 12.5% each; the equal-count pair uses ascending numeric bucket key as the stable tie-break.

Each swatch uses the original-channel mean

Replace half of the red cells with nearby RGB 250, 4, 6. They remain in the same upper-four-bit bucket as 255, 0, 0. The bucket count and rank stay unchanged, while the displayed swatch becomes the rounded mean of all original red-bucket channels. This proves that quantization chooses membership but does not force every displayed color to the bucket corner.

Transparent pixels do not create a color

Add fully transparent cells whose hidden RGB bytes contain black or magenta. They must not change the palette totals because alpha zero is ignored. Semitransparent pixels are counted by their raw RGB channels, not by composition over the checkerboard. After validating the fixture, use a real photograph as an approximate starting point and lock exact pixels for the accents that actually matter.

Know what the value describes

PixelPick reports the RGBA bytes produced after this browser decodes the file into Canvas. Embedded profiles, browser conversion and display characteristics can make those bytes differ from another workflow. Use the result for ordinary digital design inspection, then verify important brand or production colors in their authoritative source. It is not calibrated colorimetry, physical paint matching, medical interpretation, accessibility certification or a safety measurement.