Home › Image Tools › Image Color Picker

Image Color Picker

Upload, drop or paste an image, then click or tap any pixel to get its exact HEX, RGB and HSL code. A magnifier loupe helps you hit the right pixel, and the palette extractor finds the image's dominant colors.

Last updated:

Sample image
Picked color#000000
HEX#000000
RGBrgb(0, 0, 0)
HSLhsl(0, 0%, 0%)
CMYKcmyk(0%, 0%, 0%, 100%)
History
Picked colors appear here.

Dominant colors

Advertisement

How to use the Image Color Picker

  1. Add an image: drop it on the box, paste a screenshot with Ctrl+V, or click Choose image. A sample image is loaded so you can try it right away.
  2. Move over the image: the loupe shows the pixels under the cursor, zoomed in. On a phone, touch and slide your finger, then lift to pick.
  3. Click to pick a color. Its HEX, RGB, HSL and CMYK codes appear on the right; press Copy next to the format you need.
  4. Extract a palette: choose how many colors (5 to 10) and the tool groups similar pixels to find the dominant colors and their share of the image.
  5. Reuse colors: click a swatch in the history or palette to load it again, or download the palette as a PNG.

Color code formats explained

Every pixel on a screen is a mix of red, green and blue light, each stored as a number from 0 to 255. The same color can be written in several notations:

FormatExampleWhere it is used
HEX#FF6347CSS, HTML, Figma, Canva, most design tools
RGBrgb(255, 99, 71)CSS, image editors, programming
HSLhsl(9, 100%, 64%)CSS; easy to make lighter, darker or less saturated variants
CMYKcmyk(0%, 61%, 72%, 0%)Print design (a naive conversion; printers use color profiles)

How to convert between the formats

RGB to HEX: write each channel as two hexadecimal digits. 255 = FF, 99 = 63, 71 = 47, so rgb(255, 99, 71) = #FF6347.

RGB to HSL: scale each channel to 0–1 (r = 1, g = 0.388, b = 0.278). Max = 1 and min = 0.278, so lightness L = (max + min) / 2 = 0.639 = 64%. The difference d = 0.722, saturation S = d / (1 − |2L − 1|) = 0.722 / 0.722 = 100%. Because red is the largest channel, hue H = 60 × ((g − b) / d) = 60 × 0.153 ≈ 9°.

RGB to CMYK: K = 1 − max(r, g, b); then C = (1 − r − K) / (1 − K), and likewise for M and Y. For #FF6347 this gives C 0%, M 61%, Y 72%, K 0%.

Tips for picking accurate colors

  • Use averaging on photos. JPEG compression and sensor noise make neighboring pixels differ. A 3×3 or 5×5 sample gives the typical color of an area rather than one stray pixel.
  • Pick from the original file, not a screenshot of a scaled-down preview. Screenshots of web pages can be color-managed or scaled, which shifts edge pixels.
  • Avoid edges and text. Anti-aliasing blends the foreground with the background, so edge pixels are an in-between color.
  • Use the palette for brand colors. The dominant colors from a logo or product photo are a quick starting point for a matching website or slide theme.
  • Check contrast before using picked colors for text: dark text on a light picked background should reach a contrast ratio of at least 4.5:1.

Frequently asked questions

How do I get the color code from an image?

Open the image in this tool and click the pixel you want. The exact HEX code (such as #3A7BD5), the RGB values and the HSL values appear instantly, each with a copy button.

Why is the picked color slightly different from what I expected?

Photos contain noise and compression artifacts, so neighboring pixels often differ by a few values. Set Sample size to 3×3 or 5×5 to average the area around the cursor, which gives a more representative color.

How does the palette extraction work?

The image is scaled down and its pixels are grouped with the k-means clustering algorithm: each pixel is assigned to the nearest of k colors, and each color is moved to the average of its pixels until the groups stop changing. The resulting colors are sorted by how much of the image they cover.

Can I pick a color from outside the image, like another app or website?

Yes, in browsers that support the EyeDropper API (Chrome and Edge on desktop). Press Pick from screen and click anywhere on your screen. In other browsers take a screenshot and paste it here instead.

Is my image uploaded?

No. The image is read and analyzed entirely in your browser with JavaScript. Nothing is sent to a server.

What is the difference between HEX, RGB and HSL?

They describe the same color in different ways. RGB gives the red, green and blue amounts from 0 to 255. HEX writes those same three numbers in base 16, for example rgb(255, 99, 71) = #FF6347. HSL describes hue (0 to 360 degrees), saturation and lightness in percent, which is handy for making lighter or darker variants.

Does it work with transparent PNGs?

Yes. Transparent areas are shown over a checkerboard, and the color values are reported for the RGB channels of the pixel along with its alpha. Fully transparent pixels are skipped when extracting the palette.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Color Palette GeneratorGenerate beautiful color palettes and export them.HEX to RGBConvert HEX colors to RGB and other formats.Color Name FinderFind the closest color name for any HEX or RGB color.RGB to HEXConvert RGB to HEX with sliders, live swatch and one-click copy.CSS Color Filter GeneratorTurn a HEX color into a CSS filter that recolors black icons and SVGs, with an accuracy score.Hex Opacity CalculatorConvert opacity percent to a 2-digit HEX alpha code and full #RRGGBBAA color, with a 0-100% table.HEX to PantoneFind the 5 closest Pantone-style solid coated colors for any HEX or RGB, ranked by Delta E.Invert PDF ColorsTurn a PDF into dark mode: invert colors, keep hues or use a night sepia theme for easy reading.HEX to HSLConvert HEX colors to HSL and back with interactive sliders.RGB to CMYK ConverterConvert RGB and HEX colors to CMYK for print, and back.Color Contrast CheckerCheck WCAG contrast ratios and find accessible text colors.Pantone to HEXLook up approximate HEX, RGB and CMYK values for Pantone colors.Color Blindness SimulatorSee any image as people with protanopia, deuteranopia, tritanopia or achromatopsia see itColor Shades GeneratorTurn one HEX color into a 50-950 scale plus tints, shades and tones, ready to export.Tailwind Color GeneratorTurn one color into a full Tailwind 50–950 shade scale and export the config or CSS.Color MixerMix two colors in sRGB, linear, OKLab or OKLCH, or blend them with Photoshop-style modes.Random Color GeneratorGenerate random HEX colors one at a time or in batches, with hue, saturation and lightness ranges.Color WheelFind complementary, triadic, analogous and other color harmonies on an interactive wheel.Color PickerPick any color and get HEX, RGB, HSL, HSV and CMYK codes, shades and a screen eyedropper.HTML Color CodesAll 140 HTML color names with HEX and RGB codes, plus the 216 web-safe colors. Click to copy.Color Palette from ImageExtract the main colors of any photo as HEX codes, CSS variables and a palette PNG.Replace Color in ImageClick a color in a picture and swap it for a new color or transparency, keeping the shading.CMYK to RGBConvert CMYK percentages to RGB and HEX color codes with sliders and a live preview.HSL to HEXConvert HSL and HSLA colors to HEX and RGB with sliders and a live preview.HEX to RGBAConvert HEX color codes to CSS rgba() with an opacity slider and one-click copy.RGBA to HEXConvert rgba() colors to 8-digit HEX, or flatten transparency onto any background.HEX to CMYKConvert HEX color codes to CMYK percentages for print, with a live preview.Color Temperature to RGBConvert a color temperature in kelvin (1000-40000 K) to RGB and HEX with a live swatch.OKLCH Color ConverterConvert HEX, RGB and HSL to OKLCH, OKLab, Lab and LCH with sRGB and P3 gamut checks.RAL to HEXLook up RAL Classic codes as HEX, RGB and CMYK, search by name or find the nearest RAL.RGB to HSLConvert RGB values to HSL, HSV and HWB with a live swatch and copy-ready CSS.Color Code ConverterConvert a color between HEX, RGB, HSL, HSV, CMYK, LAB, LCH and OKLCH with a live swatch.Room Paint Color VisualizerUpload a room photo, select the walls and preview any paint color or HEX with real lighting.Photo to Pop ArtMake Warhol-style pop art from a photo: posterized color tiles in 1, 4 or 9 grids with custom palettes.Screen Color PickerPick any pixel color from anywhere on your screen and copy it as HEX, RGB or HSL.Solid Color Image GeneratorMake a plain single-color or transparent image in any size, like 1920x1080, as PNG or JPG.White Balance CorrectorFix color casts: click a neutral gray point or use auto gray world, then fine-tune temperature and tint.CMYK to HEXConvert CMYK percentages to a HEX color code and RGB, with a live swatch and shades.Photo Color MatchCopy the color grading of a reference photo onto your image (Reinhard color transfer).
See all 38 Color Tools →