Back to Blog

One Pixel Was White

November 18, 2026
Share:
One Pixel Was White

I clicked a purple stripe and got #ffffff. The stripe was clearly purple. The pixel under the cursor was a single white speck, and an eyedropper does exactly what you tell it: it read that one pixel.

That's the whole problem with picking a color off a picture. You want the color you see. The tool gives you the pixel you hit. On a flat logo those are the same. On a photo, a JPEG or a hand-painted sign, they often aren't.

So the Eyedropper on Softery shows you the pixels before you click, lets you average a small square instead of trusting one, and puts a Copy button on every format it prints.

The hex that looked close

Someone sends a screenshot and asks for "the same blue". You open it, squint, and type a hex that looks about right. Then you put your button next to their logo and it's off. A little greener, a little darker. You can't say why. You just know it's wrong.

Most people guess, because the other options are a pain. A design app can pick a color if the picture is already open in it. The browser's dev tools pick colors off a web page, not out of a PNG on your desktop. Phone apps do it too, with ads.

What I wanted was smaller than all of that. Drop a picture in a tab. Point. Click. Copy the code. Close the tab.


Rank 42 of 1,754

This idea sat 42nd out of 1,754 in my queue, score 9.05, with an estimate of about seven hours. The card for it was short and a bit angry.

The best known color picker app on the iPhone has 978 ratings. The bad reviews keep coming back to two things: ads, with the sound on by default, and a monthly fee for something basic. A few say the copy button doesn't work. One review title says it better than I can:

Can't copy hex codes?

That's the job. The whole job. If copying the hex is broken, the app is broken, no matter how nice the color wheel looks.

Bing gives 25 completions for "color picker", and that list is capped, so the real number of ways people phrase it is higher. People type this a lot. They want one color out of one picture.


What the page does

You give it a picture one of three ways:

  • Drop a file on the dashed box.
  • Click Choose an image.
  • Take a screenshot to the clipboard and press Cmd-V or Ctrl-V anywhere on the page.

The third one is the one I use most. A screenshot never has to touch the desktop.

Then you move over the picture. A loupe follows the cursor. It shows 11 by 11 pixels of your picture, each one blown up into a 12 pixel block, and the square in the middle is outlined. That's the pixel you'll get. Under the loupe you see its hex and its x and y.

Click, and a Picked color panel shows four rows: HEX, RGB, HSL and OKLCH. Each row has its own Copy button. Press it and the button says Copied, and plain text is on your clipboard.

You doYou get
HoverThe loupe, the hex under it, x and y
ClickHEX, RGB, HSL and OKLCH rows
Copy HEX#e4572e on the clipboard, nothing else
Arrow keyThe cursor moves one pixel
Shift and arrowTen pixels
EnterPicks where the cursor is

Why the loupe matters

On a normal screen one image pixel is a few device pixels, maybe less if the picture is bigger than the window. Your mouse is not that precise. On a one pixel border in a retina screenshot, you're guessing which side of the line you're on.

The loupe takes the guess away. You see the edge, you see which block is outlined, and you click when the right one is in the middle. If your hand can't land it, the arrow keys can. One press is one pixel.

A plain swatch under the cursor tells you what you're about to get, but not why. The loupe tells you why. If the outlined block is a white speck in a sea of purple, you can see it before you click.


One pixel can lie

Back to the white speck. The page has a built-in sample, so you can try this without a file. It's 480 by 300 pixels, drawn in the tab: four flat swatches and one speckled purple strip that behaves like a heavily compressed photo.

The strip's real color is #8e5572. Every pixel in it wobbles a few steps around that, and some pixels are pure white specks. Click the speck at x 74, y 222 with the default setting and you get #ffffff. That's correct. It's the pixel you clicked. It's just not the color you meant.

JPEG does this on purpose. It stores a picture in 8 by 8 blocks and throws away detail it thinks you won't notice. Flat areas come back with a faint grain, and edges pick up halos. A painted sign photographed on a phone has brush texture, paint flecks and glare on top of that.


The 3 and 5 pixel average

Next to the buttons there's a Sample setting with three choices: 1 px exact, 3 by 3 average and 5 by 5 average.

At 1 px exact you get the one pixel. At the averages the page takes the square around the cursor, adds up the channels and divides. The loupe draws the bigger square so you see what goes in.

Here's the same click on the speck at each setting:

SampleResultDistance from #8e5572
1 px exact#ffffffthe speck itself
3 by 3 average#996582close
5 by 5 average#925b77closer

The average weights each pixel by its alpha, so a see-through pixel at the edge of a logo doesn't drag the result toward black. If the whole square is clear, you get a fully clear pixel back, and the hex prints with its alpha byte.

I kept 1 px exact as the default. Most of the time you're picking off a flat logo or a UI screenshot, and there the exact pixel is the honest answer. Turn the average on when the picture is noisy.


Copy is the product

The copy buttons are the part I cared about most.

Every row has its own button. It writes plain text, the exact string you see in the row. HEX is six digits, or eight when the pixel is see-through. A half clear red prints as #ff000080 and rgba(255, 0, 0, 0.5). RGB is the CSS function you can paste into a stylesheet. HSL and OKLCH come from the same converter the Color Format Converter uses, so the numbers match between the two pages.

Your picks pile up in a strip under the panel, newest first, up to 12. Click a chip to copy that hex. Copy all gives you the whole list, one hex per line, in the order you picked them. That's the shape a CSS variables block or a note wants.

The strip survives a refresh. It's kept in this browser's local storage, as hex codes only. The picture isn't stored anywhere. Clear empties the strip.


What stays in the tab

The picture is drawn on a canvas in the tab and read there. Nothing gets uploaded. There's no server step to wait on, which is also why the loupe keeps up with the mouse.

Mixpanel and Google Analytics load with Softery.io, like on every page of the site. They see that someone opened the tool and copied something, plus the file's size in a rough bucket and its format. They don't get the picture, the color you picked or the coordinates.

A typical picker siteThis page
Your pictureUploaded to a serverStays in the tab
AdsAround the canvasNone on this page
ZoomOften none11 by 11 loupe on the cursor
Noisy photoOne pixel only1, 3 by 3 or 5 by 5
CopyOne button, sometimes brokenOne per row, plus Copy all

Colors and color profiles

One more thing that trips people up. Photos from newer phones and design tools often carry a color profile, like Display P3. When a browser draws a picture, it converts it to sRGB for the canvas. So the code you copy is the sRGB value a web page would show for that pixel, which is almost always what you want if the color is going into CSS.

If you need the wide-gamut number, take the hex to the converter and copy its display-p3 row. It won't recover color the canvas already clipped, but for a picked sRGB color it gives you the same color written in the P3 space.


Limits I'd rather tell you up front

  • 40 MB per file.
  • 16,777,216 pixels, which is the biggest canvas Safari will draw. A 12 megapixel phone photo fits. A 48 megapixel one doesn't, so shrink it first.
  • PNG, JPEG, WebP and GIF work in every current browser. AVIF works where the browser can decode it. A GIF shows its first frame.
  • HEIC from an iPhone doesn't draw in most browsers. Run it through HEIC to JPG first.

The page checks the first bytes of the file, not the name, so a PNG renamed to .jpg still opens, and a text file renamed to .png gets a clear message instead of a broken canvas.


Built with tests first

The rules for this repo say test first, and the pixel math is the part that most needs it. Mapping a mouse position to an image pixel sounds trivial until the picture is drawn at half size, or at three times its size, or the pointer is a hair past the edge.

The tests pin the boring cases: the right half of pixel 0 is still pixel 0, a pointer past the bottom right corner clamps to the last pixel, a 3 pixel image drawn 300 pixels wide maps each 100 pixel block to one pixel. Shift and an arrow move ten pixels and stop at the edge. The 3 by 3 average of a known block rounds to an exact value. A history of 15 picks keeps 12.

The sample is built byte by byte from a fixed formula, so the test can say the speck at x 74, y 222 is #ffffff and the first swatch's center is exactly #e4572e. If anyone changes the sample, the test notices.


When you need more than one color

The Eyedropper answers one question: what is the code of this exact color. If you want the main five or six colors of a whole photo, that's a different job, and Color Palette From Image does it.

If you picked a text color and want to know whether it reads on its background, the contrast checker does the WCAG math. If the code you have is in the wrong format, the Color Format Converter turns it into any other one.


How to get a color out of a picture in 20 seconds

  1. Take a screenshot to the clipboard, or have the file handy.
  2. Open the Eyedropper and press Cmd-V or Ctrl-V, or drop the file.
  3. Hover until the loupe shows the block you want in the middle. Use the arrow keys for the last pixel.
  4. If the picture is a photo or a JPEG, set Sample to 5 by 5 average first.
  5. Click, then press Copy HEX, or whichever row your file wants.

That's it. Close the tab when you're done and the picture goes with it.


Last updated: November 18, 2026 | Reading time: 10 minutes

Written by Softery.io, which clicked a white speck on a purple stripe more times than it wants to admit.