The tool you need, ready to use

Image Color Picker

Choose or paste an image and click any point to get that pixel's HEX, RGB, HSL, HSV and CMYK codes and the nearest CSS color name straight away. Use the magnifier to check a one-pixel difference, read JPEG photos with a 3×3 average, and extract the main colors of the whole image with share bars, then save them as a PNG or CSS variables. The image is never sent to a server.

Last updated 2026-10-14All math stays in your browser

The image is read only inside this browser. It is never uploaded or stored.

Choose or paste an image and it will appear here

Click or drag to pick the color at that point. Keyboard: arrows move 1 px, Shift+arrows 10 px, Enter saves to recent colors.
Sampling area
Picked color
Magnifier 11×11

    Text on this color as a background

      Recent colors
        Main colors of the image

          Last updated 2026-10-14Your inputs are not stored

          ROBERIN standardThe tool you need,
          ready to use.
          • Clear at a glanceInputs and results sit where you expect them.
          • Result firstThe key number comes first; the working only when you need it.
          • Ask lessNo sign-up and no unnecessary details.

          Click anywhere on an image to get that pixel's color code: the center of the sun in the sample image (880, 470) is #FBEDCA

          This color picker from image draws the file you choose onto a canvas in your browser, reads the pixel you click and shows it as five codes: HEX, RGB, HSL, HSV and CMYK. Click the middle of the sun in the sample image and you get rgb(251, 237, 202), which is #FBEDCA, together with the nearest CSS color name, blanchedalmond. The value comes from the original pixels (up to 4,096 px on the long side), not from the shrunken preview on screen, so even a large photo can be sampled one pixel at a time.

          The magnifier next to the image enlarges the 11×11 pixels around the point you picked, and the arrow keys move the point one pixel at a time. For images where neighboring pixels differ a little, such as JPEG photos, switching the sampling area to a 3×3 or 5×5 average gets you closer to the representative color. "Main colors of the image" below groups the colors used most across the whole picture, shows each share as a bar, and saves the palette as a PNG or as CSS variables. The image is read only inside this browser and never sent to a server.

          When you need to pick a color from an image

          • Copying a brand color from a screenshot: click the background or button color in a logo or a screen capture, copy the HEX, and paste it into a CSS variable or a design tool. Read flat areas such as a logo with 1 pixel, and use the magnifier to check that an edge pick is inside the shape.
          • Matching a thumbnail, banner or slide to a photo: pull 4 to 8 main colors from one photo and use them for the title background and accents, so the text and the picture look like they belong together. Large shares work as backgrounds and small ones as accents.
          • Choosing a background for text: check straight away whether white or black text is readable on the color you picked. On the sun color #FBEDCA, only black text works (18.0:1); white text (1.1:1) is unusable.
          • Measuring reference values for retouching or illustration: reading the real values of sky, skin or shadow lets you compare before and after, or match the tone of another picture. A 3×3 or 5×5 average filters out the noise in a single pixel.

          How to use it

          1. Load an image: press "Choose image", drop a file onto the page, or paste a copied image with Ctrl+V (⌘V). To try it right away, press "Sample image".
          2. Pick a point: click the image and the color at that spot appears in the result; hold and drag to follow the pointer. When you let go, the color is kept in "Recent colors" (up to 8). On a touch screen, the point where you lift your finger is picked.
          3. Land on one exact pixel: the center cell of the magnifier is the picked pixel. With the stage focused, the arrow keys move 1 pixel, Shift+arrows move 10 pixels, and Enter saves the color to recent colors.
          4. Choose the sampling area: use 1 pixel for flat areas, a 3×3 average for JPEG photos and scans, and a 5×5 average for noisy photos. The border cells of the magnifier show the area being averaged.
          5. Copy the codes: press "Copy" on a line, or "Copy all codes" to copy all five lines at once. A pixel that is not 100% opaque gets a separate opacity line.
          6. Extract the main colors: loading an image gives 6 colors straight away, and you can switch to 4, 8 or 12. Press a chip to show that color's codes above. "Save palette as PNG" makes a picture with the chips, HEX values and shares, and "Copy CSS variables" produces lines such as --color-1: #1F2531;.

          What the five color codes mean

          The same color is written five ways because each is used in a different place. These are the values for four points on the sample image.

          PointHEXRGBHSLHSVCMYKNearest CSS name
          Center of the sun (880, 470)#FBEDCArgb(251, 237, 202)hsl(43, 86%, 89%)hsv(43, 20%, 98%)cmyk(0%, 6%, 20%, 2%)blanchedalmond
          Upper sky (200, 100)#675D75rgb(103, 93, 117)hsl(265, 11%, 41%)hsv(265, 21%, 46%)cmyk(12%, 21%, 0%, 54%)dimgray
          Sea (300, 700)#243048rgb(36, 48, 72)hsl(220, 33%, 21%)hsv(220, 50%, 28%)cmyk(50%, 33%, 0%, 72%)midnightblue
          Cliff (1100, 700)#1D1E22rgb(29, 30, 34)hsl(228, 8%, 12%)hsv(228, 15%, 13%)cmyk(15%, 12%, 0%, 87%)midnightblue

          The values in the table were read from the sample image (sample.jpg, 1,280 × 854) with this tool on 2026-10-14. The HEX, RGB, HSL, HSV and CMYK conversion formulas and the contrast formula are not rules that change from year to year, and the nearest names are based on the 148 colors of CSS Color Level 4.

          • HEX joins the red, green and blue values as two digits each, 00 to FF, into six characters. It is the most common form in CSS, design tokens and shared documents. In #FBEDCA, FB = 251, ED = 237 and CA = 202.
          • RGB writes the same three values as decimal numbers from 0 to 255. Canvas, scripts and image-processing code use these numbers directly.
          • HSL is hue (0 to 360°), saturation and lightness. CSS Color Level 4 puts 0° at sRGB red, 120° at green and 240° at blue, and HSL values resolve to sRGB. It is handy for describing and adjusting a color: "a bit lighter", "less saturated".
          • HSV (also called HSB) is hue, saturation and value, where V is the largest of the three channels. It is the model behind the color pickers in painting tools such as Photoshop. Alvy Ray Smith published HSV in 1978, and Joblove and Greenberg published HSL the same year. The same color has different saturation in HSL and HSV (the sun's center is 86% in HSL and 20% in HSV).
          • CMYK here uses the naive conversion given in CSS Color Level 5: black K = 1 − max(R, G, B), and the other channels are the shares left after removing black (C = (1 − R − K) ÷ (1 − K)). Because it has no ink, paper or profile information, the specification itself warns that this approximation "is likely to be visually very far from the actual printed result". For print orders, use values converted with your printer's ICC profile.

          Why one pixel and a 3×3 average differ

          JPEG stores color at a lower resolution than brightness. The common 4:2:0 scheme halves the color resolution both horizontally and vertically, so each 2×2 block of pixels shares one color sample, and the image is cut into 8×8 blocks that go through a frequency transform and quantization. Near edges and along block borders this adds small wobbles that were not in the original (noise and blocks), so neighboring pixels in the same flat area differ a little. On the sample image, reading the sea at (640, 560) with 1 pixel gives #2F405C, and a 3×3 average gives #2E3F5C. The eye sees the same blue, but the red and green values differ by 1.

          Anti-aliased text, lines and gradients also produce a blend of two colors at their edges. In those places, check in the magnifier that the center cell sits inside one area and nudge it a pixel or two with the arrow keys. Conversely, a 3×3 or 5×5 average mixes two areas when both fall inside the range, so near a boundary it is better to turn averaging off and read 1 pixel. For images without compression noise, such as a PNG logo or a UI screenshot, the single pixel value is already the right answer.

          How the main colors are extracted

          From the whole image, the tool picks up to 40,000 pixels at even intervals among those that are at least half opaque (alpha 128 or more). The sample image (1,280 × 854) is read every 6 pixels, which gives 30,602 samples. Those samples are grouped with Heckbert's (1982) median cut: choose the red, green or blue channel with the widest spread, split the box where half the samples fall on each side, and repeat until there are as many boxes as colors you asked for, then take each box's average color. Next, in the OKLab color space (Ottosson 2020), which is closer to how the eye sees color differences, each sample is reassigned to its nearest color and the averages are refined four times. There is no random starting point, so the same image with the same number of colors always gives the same result.

          Sample image, 6 colorsHEXShareWhere the color appears
          1#1F253129%Cliff and rock shadows
          2#434C6B17%Sea
          3#F4CF9C15%The sun and the sky around it
          4#816A7315%Upper sky
          5#BA857414%Band of cloud
          6#DFA57D9%Sky near the horizon

          The length of each bar is the share of samples nearest to that color. Dropping to 4 colors merges similar colors into bigger groups (dark base 34%, pinkish 23%, apricot 22%, purplish 20%), and raising it to 12 splits the sky gradient into several steps. For a thumbnail background, 4 to 6 colors fit; to see a photo's tones in more steps, use 8 to 12. A palette lists the colors used most, not the ones that stand out, so a small accent color can drop out because its share is low. Pick those directly.

          Contrast ratio: can text go on this color?

          "Text on this color as a background" in the result is the WCAG 2.2 contrast ratio. It takes the relative luminance of the two colors, L1 for the lighter and L2 for the darker, and computes (L1 + 0.05) ÷ (L2 + 0.05). Success criterion 1.4.3 requires at least 4.5:1 for body text and 3:1 for large text (18 pt or larger, or 14 pt bold). The stricter 1.4.6 (AAA) asks for 7:1 and 4.5:1. So that 4.499:1 is not displayed as 4.5 and read as a pass, this tool rounds down (truncates) below the first decimal place and judges on that value.

          BackgroundWhite textBlack textVerdict
          Sun #FBEDCA1.1:118.0:1Only black text passes for body text
          Sky #675D756.1:13.3:1White passes for body text; black only for large text
          Sea #24304813.1:11.5:1Only white text passes for body text
          Palette color 4 #816A734.9:14.2:1White passes for body text; black only for large text

          The ratio is measured only for white and black text. For other text colors or for a pair of two colors, use a dedicated contrast checker.

          Common mistakes

          • The value differs from another app: the default canvas color space is sRGB, and an image with a color profile such as Display P3 is converted to sRGB by the browser when read. The value can differ from one picked in an app that shows P3, and saturated colors outside sRGB are pushed back inside its range.
          • Reading from a shrunken preview: an image redrawn at preview size holds values that mix several pixels. This tool reads at the original size (within 4,096 px on the long side), but an image larger than that is shrunk first, so when the screen says it was read at a reduced size, values near edges are blended averages.
          • Colors on transparent pixels: in a transparent PNG, a fully transparent pixel (alpha 0) has no color, and a translucent pixel gets a separate opacity line. If you want the color as it looks on a white background, you have to composite it with white yourself.
          • Taking a CSS name as the exact color: the name is only the closest of the 148 CSS colors by OKLab distance. When the label says "Nearest", the color is not the same as that name. The CSS specification itself discourages using these names.
          • Mixing up HSL and HSV saturation: the same color has a different S in each model. Check which model your design tool's color picker uses, then copy the matching line.
          • Averaging across an edge: when two areas both fall inside a 3×3 or 5×5 range, you get a value halfway between the two colors. Check that the border cells of the magnifier stay inside one area.

          Limits and cautions

          • An image larger than 4,096 px on the long side is shrunk to that size before reading (the iOS canvas limit), so its pixels are blended by the same ratio, and coordinates refer to the shrunken image.
          • Values are in sRGB. For an image with a color profile, the value is what the browser gives after converting to sRGB, and translucent pixels are stored by the canvas with premultiplied alpha and restored, so they can differ from the original, and the lower the opacity, the larger the difference.
          • The fingerprinting protection in some browsers mixes very small noise into values read from a canvas. If the same image gives values that wobble by 1, suspect that setting.
          • You can load any format the browser can decode (JPG, PNG, GIF, WebP, AVIF, SVG, BMP and so on), up to 40 MB. Only Safari opens TIFF, and iPhone HEIC opens only in Safari 17 or later; Chrome, Edge and Firefox cannot open it.
          • CMYK is a naive conversion and not a print reference, and the contrast ratio is measured only for white and black text.
          • The image and coordinates are not stored. Only the HEX codes of up to 8 recent colors stay in this browser's storage. This tool has no state link.

          Sources

          Frequently asked questions

          Is my image uploaded to a server?

          No. The image you choose is drawn only on a canvas in this browser, and the pixel values are read inside the browser too. Nothing is sent or stored, and it disappears when you close the tab. Only the codes of up to 8 recent colors stay in this browser's storage (localStorage).

          Which image files can I use with this color picker from image?

          Any format your browser can decode. JPG, PNG, GIF, WebP, AVIF, SVG and BMP open in all major browsers, and only Safari opens TIFF. iPhone HEIC files open only in Safari 17 or later, not in Chrome, Edge or Firefox, so converting them to JPG first is the safe choice. Files up to 40 MB are accepted.

          Why does the value differ from Photoshop or another app at the same spot?

          Three reasons are common. If the image has a color profile such as Display P3, the browser converts it to sRGB when reading, which changes the value; JPEG compression makes neighboring pixels differ slightly; and some apps show an average instead of one pixel. Try a 3×3 average instead of 1 pixel and check the surrounding pixels in the magnifier.

          When should I use 1 pixel and when a 3×3 or 5×5 average?

          One pixel is exact for flat areas such as logos, icons and UI screenshots. JPEG photos, scans and noisy images have values that wobble between neighbors, so a 3×3 or 5×5 average is closer to the representative color. Near an edge the average mixes both colors, so check in the magnifier that the sampling area sits inside one area.

          How is the main-colors palette extracted, and is it the same every time?

          Up to 40,000 pixels that are at least half opaque (alpha 128 or more) are sampled at even intervals, grouped with median cut (Heckbert 1982) by repeatedly halving the widest color channel, then refined four times in the OKLab color space. There is no random starting point, so the same image with the same number of colors always gives the same colors. Each bar is the share of samples nearest to that color.

          Can I use the CMYK value as-is for a print order?

          No. The CMYK here is the naive conversion defined in CSS Color Level 5 (black = 1 − max RGB, the rest are the shares left after removing black), with no ink, paper or profile information. For print, use values converted with the ICC profile your printer specifies, and treat this one as a rough reference only.

          What is the white and black text contrast ratio, and what should it be?

          It is the WCAG 2.2 contrast ratio, (L1 + 0.05) ÷ (L2 + 0.05), between this color and white or black text placed on it. Body text needs at least 4.5:1 (AA), large text (18 pt or larger, or 14 pt bold) needs at least 3:1, and the stricter AAA level asks for 7:1. The tool rounds down to one decimal so a value like 4.499 never looks like a pass.

          Where are recent colors stored and how do I delete them?

          Up to 8 HEX codes per language are saved in this browser's localStorage. Images and coordinates are not saved. They don't appear on other devices or browsers, and the Clear button removes them at once. In a private window they disappear when the window closes.