How an Image to Prompt Tool Names a Colour
The colour part of a prompt is a lookup, not a description: thirty-five fixed anchors in RGB, each pixel thrown at the nearest one, and the winners counted. Run that over forty real files and you get 197 colour slots that use 21 of the 35 names — so 14 anchors never appear once, including every red, every yellow and every purple. A picture gets between 3 and 5 slots, but the writer stops at four names, so 38 of the 40 files silently lose a colour that measured between 0.6 and 10.3 percent of their pixels. And the grey scale does not come back as grey: six evenly spaced greys return six different names, one of which is cream.
What these numbers are. Forty real files — 39 photographs at 640 × 360 and one code screenshot at 800 × 450 — decoded on this machine and box-downsampled to the 192 × 192 grid the live tool measures on. Colour buckets are the same 12-bit keys the browser script builds, merged at a Euclidean distance below 52, then named by nearest anchor and capped at four words. No image model was called and no image was generated: every figure describes the words this tool writes. The palette numbers come from the same table the page runs on, not from a design document.
The palette is thirty-five anchors and one distance rule
Before any naming happens, the tool reduces the image. Each pixel is bucketed by its top four bits per channel — a 4,096-cell grid — and each bucket keeps a running sum and a count. Buckets are then visited largest first and either merged into an existing cluster or started as a new one, depending on a single number: if the straight-line RGB distance from the bucket's mean to a cluster's mean is under 52, the bucket joins it; otherwise it becomes its own cluster. Clusters are sorted by pixel count and the top five survive.
That ordering is where the palette stops being descriptive. The merge rule compares against clusters already formed, so it merges toward whichever cluster came first, which is whichever cluster was largest. It is not a symmetric distance test between neighbours; it is a greedy pass over a size-sorted list. On the forty files the effect is visible: of the 157 adjacent colour pairs inside a finished palette, only 1 sits closer than 52 apart, with a median separation of 104. The merge rule leaves the palettes well spread out — but it also means the five colours you see are not the five most common colours in the picture. They are five buckets that happened to be far enough from each other, taken in order of size.
Forty pictures, 197 slots, twenty-one names
Name every surviving cluster by its nearest anchor and count. The forty files yield 197 slots, an average of 4.9 per picture, using 21 distinct names out of 35. The full usage list, ordered by how many of the forty files each name appears in:
| Name | Anchor RGB | Files | % of 40 | Mean share |
|---|---|---|---|---|
| charcoal | 46, 46, 52 | 30 | 75.0 | 0.309 |
| silver | 190, 193, 198 | 28 | 70.0 | 0.203 |
| grey | 128, 128, 130 | 27 | 67.5 | 0.148 |
| tan | 198, 168, 128 | 19 | 47.5 | 0.198 |
| slate | 92, 102, 116 | 19 | 47.5 | 0.178 |
| black | 12, 12, 14 | 12 | 30.0 | 0.214 |
| cream | 244, 232, 208 | 11 | 27.5 | 0.159 |
| white | 246, 246, 248 | 9 | 22.5 | 0.185 |
| moss green | 95, 120, 62 | 8 | 20.0 | 0.137 |
| brown | 118, 74, 45 | 7 | 17.5 | 0.128 |
| olive | 118, 120, 55 | 6 | 15.0 | 0.106 |
| beige | 228, 214, 190 | 5 | 12.5 | 0.145 |
| gold | 212, 175, 80 | 3 | 7.5 | 0.052 |
| navy | 22, 36, 92 | 3 | 7.5 | 0.527 |
| forest green | 32, 78, 44 | 2 | 5.0 | 0.147 |
| steel blue | 70, 120, 170 | 2 | 5.0 | 0.088 |
| sky blue | 96, 164, 226 | 2 | 5.0 | 0.040 |
| teal | 22, 140, 140 | 1 | 2.5 | 0.019 |
| coral | 240, 110, 95 | 1 | 2.5 | 0.089 |
| blue | 42, 82, 190 | 1 | 2.5 | 0.408 |
| cyan | 64, 190, 210 | 1 | 2.5 | 0.161 |
The usual prompt-engineering advice for colour is to be specific — name the exact pigment, the exact hex, the exact paint. That advice assumes the words you write reach the model. Here they do not: whatever you type, the tool's own sentence is built from these 35 strings, and the strings you would reach for first are the ones it reaches for last. Read the bottom of the table and then read the list of names that never appear at all: red, crimson, orange, amber, yellow, lime, green, emerald, maroon, indigo, purple, violet, magenta, pink. Fourteen anchors, and they are not the obscure ones. They are the primaries and the secondaries.
The explanation is in the merge rule, not in the anchor positions. Across the forty files, 75 percent of pictures produce a charcoal and 70 percent a silver. Those two anchors sit, by construction, at the ends of the neutral range, and any photograph of anything contains a dark end and a light end. Because the merge pass works down a size-sorted list of buckets, the dark tail of a shadow and the light tail of a highlight both survive as separate clusters, each far more than 52 away from everything else, and both get named. A saturated mid-tone — the red of a coat, the yellow of a sign — occupies fewer buckets and merges into whatever large cluster it is nearest to. Saturation loses to luminance, and it loses on every picture.
Which anchors actually win territory
Nearest-anchor lookup defines a region around each anchor: every colour in RGB belongs to exactly one of the 35. Sampling the cube at a step of 16 per channel gives 4,096 points, and every one of the 35 names wins at least one. The sizes are wildly uneven.
| Name | Sample points | Share of cube |
|---|---|---|
| cyan | 298 | 7.3% |
| magenta | 279 | 6.8% |
| lime | 276 | 6.7% |
| green | 264 | 6.4% |
| … | — | — |
| gold | 58 | 1.4% |
| charcoal | 56 | 1.4% |
| moss green | 51 | 1.2% |
| black | 29 | 0.7% |
| white | 27 | 0.7% |
| cream | 26 | 0.6% |
The ordering runs opposite to the usage list. Cyan owns the largest territory in the cube — 7.3 percent of it — and appears on exactly one of the forty files. Cream owns the smallest territory, 0.6 percent, and appears on eleven. Territory is a property of the anchor table; appearance is a property of photographs. The two have almost nothing to do with each other, and only one of them is under your control when you write.
The asymmetry also tells you something about the edges. Black and white own 0.7 percent each, which is what happens when you place a single anchor near a corner of the cube: only colours that are genuinely almost that corner get assigned to it. A neutral at 60,60,60 is closer to charcoal at 46,46,52 than to grey, and a neutral at 100 is closer to slate. This is why the greys saturate the usage list while the primaries never appear: near the ends of the luminance range the anchors are packed closely in angle and spread thinly in use, and in the middle of the saturation range the reverse is true.
The grey axis does not come back as grey
Six evenly spaced neutrals, put through the same nearest-anchor lookup:
20,20,20 → black 60,60,60 → charcoal 100,100,100 → slate 140,140,140 → grey 180,180,180 → silver 220,220,220 → cream
Two of the six are not what anyone would write by hand. A pure grey at 100,100,100 reports as slate, which is a blue-grey anchor at 92,102,116 — correct by Euclidean distance and wrong by eye, because the anchor carries a blue cast that the pixel does not. And 220,220,220 reports as cream, an anchor at 244,232,208 that is warmer than the pixel. Every neutral on the axis inherits the tint of whichever anchor happens to be closest, and because the anchors in that region are not all neutral, the report can claim warmth or coolness the picture does not have. On a monochrome photograph, the prompt will still carry a colour word, and that word will be one of the six above.
The three dark probes behave the other way. A saturated but dark red at 40,0,0, a dark green at 0,40,0 and a dark blue at 0,0,40 all report as black. Their saturation is total and their luminance is low, and Euclidean distance weights the three channels equally, so a drop of 40 in one channel is worth less than the distance to the charcoal or slate anchor. Colour that dark has no name here — not because the palette lacks one, but because the metric cannot see it.
Where one name ends and the next begins
Thirty-five anchors give 595 pairs. For each pair, take the midpoint of the two anchors and ask which name that midpoint resolves to. The answer is almost never one of the two: 507 of the 595 midpoints are won by a third anchor entirely. The boundary between any two names is not a single line but a region of the cube, and that region has a third occupier.
| Pair | Distance | Midpoint resolves to |
|---|---|---|
| olive · moss green | 24.0 | olive |
| beige · cream | 30.1 | beige |
| charcoal · forest green | 35.8 | charcoal |
| amber · gold | 38.7 | gold |
| emerald · teal | 40.0 | emerald |
| maroon · crimson | 41.5 | crimson |
| white · cream | 42.4 | white |
| silver · beige | 44.1 | beige |
Olive at 118,120,55 and moss green at 95,120,62 are 24 apart, which is small enough that they are the same colour to most eyes, and their midpoint goes to olive because it happens to be marginally nearer. Move a pixel a few units along the blue axis and it crosses to moss green. There is no band of ambiguity between them; the boundary is simply where the two distances tie, and on a twelve-pixel lattice of real photographs the tie lands on one side or the other. This is the same merge distance of 52 that governs clustering, working one level up: 18 anchor pairs sit closer together than 52, and each of those pairs is a place where the palette's own names overlap.
Practically: when two colours you care about are near neighbours in this table, the prompt will name them by whichever one dominates the cluster's mean, and the choice can flip between two similar images for no reason you can see. If you need stable wording across a set of related pictures, pick colour names that are far apart in the anchor table — navy and tan, not beige and cream.
Four words is the whole vocabulary you get
The writer takes the palette in size order and stops at four names. Not four clusters — four names, after duplicate names have already been folded together. Since a picture produces between 3 and 5 clusters, that ceiling bites on most files: 38 of the 40 produce five clusters and therefore lose one.
What is lost is small per picture and consistent across the set: the dropped fifth cluster averages 3.8 percent of the frame, with a maximum of 10.3 percent. So the ceiling is not starving the description — it is trimming the tail. But it always trims from the same direction, which is the small end of the sorted list, and the small end is exactly where a distinctly coloured object lives when the background is large and neutral. A red door in a wide grey street produces a five-cluster palette whose last member is the door.
Multiply the ceiling out and the vocabulary is bounded in a way that is easy to state and easy to check. Thirty-five names, at most four per line, ordered and without repeats: 1,297,135 possible colour phrases. The forty files produce 37 of them. That is the entire colour vocabulary of this tool's output on this corpus — not a sample of it, the whole thing.
What this means when you write a prompt by hand
- Colour words you type do not survive into the output. The palette is generated from measurement, replacing whatever the input said about colour. If you are editing the emitted line, you are editing the four names the tool chose, and the other 31 anchors are not on offer.
- Expect neutrals, not primaries. Charcoal, silver and grey appear on 85 of the 197 slots — nearly two slots in five — and carry 49 percent of the total pixel weight in those slots. If you need the prompt to say red, this pipeline will not produce it; the nearest it will get is coral or maroon, and neither appeared once in this corpus.
- For a stable description of one subject, crop to the subject. The four-word ceiling drops the smallest cluster, and the smallest cluster is what changes when you widen the frame. Cropping to the object makes the object's colour the largest cluster, which is the one guaranteed to be written.
- Do not trust a single colour word on a monochrome image. As the grey axis shows, a neutral photograph still gets a colour name, and that name may carry a blue or warm cast the photograph does not have.
- If you need an exact hue, do not ask this tool for it. Thirty-five anchors and a 52-unit merge are the resolution here. Below that, the answer is stable but coarse: nearer measurements get folded into a neighbour rather than reported.
Forty files, thirty-five anchors, and the counts behind every number above
The forty files are the same corpus used elsewhere on this site: 39 stock photographs at 640 × 360 plus one 800 × 450 code screenshot, every one decoded locally, box-downsampled to 192 × 192, and pushed through the identical bucket-merge-name path the browser runs. Clusters are 12-bit keys merged at a distance under 52, sorted by pixel count, named by nearest anchor on the 35-entry table, capped at four names after deduplication. The 197 slots are the surviving clusters across all forty files; the 21 names are those that appeared at least once. Territory figures come from a 16-step lattice over the cube, three channels of 16 values, 4,096 points, each assigned by the same nearest-anchor function. The 595 pairs and their midpoints were enumerated exhaustively from the anchor table. The 1,297,135 figure is the count of ordered, repeat-free selections of one to four names from thirty-five.
- No model was called and no image was produced. Every statement is about the words this tool writes, not about what any generator would draw from them.
- The corpus is 39 stock photographs and one screenshot. Thirty-nine landscape photos bias the palette list toward sky, foliage and skin neutrals; a corpus of product shots on white would move the top three names and lower the count of distinct names below 21.
- Territory size is a lattice estimate, not an integral. A 16-step sampling of the cube assigns 4,096 points; finer sampling would shift each share by a few tenths of a percent, which is well under the gaps between the top four.
For the slot list that the colour line is one member of, see what an image to prompt tool measures. For how the same colour value is worded differently by each of the four output shapes, see the four lines measured side by side. For the cut points at which every other phrase flips, see the twenty-nine thresholds.