100% local processing — your files and data never leave this browser. No uploads, no server storage.

OnboxTools

Free · Browser-only · No upload

Color picker from image

Hex color picker, RGB output, and pixel sampling

Use this free color picker to sample pixels from any photo, spin the color wheel, or enter a color by hex code. Copy HEX, RGB, and HSL values straight into CSS, Figma, or Tailwind.

Everything runs in your browser — images are never uploaded to a server.

HEX

#3B82F6

RGB

rgb(59, 130, 246)

HSL

hsl(217, 91%, 60%)

Upload a photo, then zoom in to pick exact pixels. Scroll wheel zooms; hold Shift and drag to move around.

More Image Tools

🖼️
Base64 to Image
🎨
Color Format
🎨
Color Picker
🖼️
Data URI to Image
🖼️
Image Compressor
🖼️
Image Resizer
🧬
Image to Base64
🔗
Image to Data URI
🖼️
JPEG to WebP
🖼️
JPG to PNG
🔄
PNG to GIF
🔄
PNG to JPG
PNG Transparency Creator
🖼️
SVG to PNG
🔄
WebP to PNG

Browse by category

Sampling a brand blue from a product photo

Imagine a product shot with a navy jacket against a warm gray backdrop. Upload the JPEG, scroll to zoom on the jacket fabric, and click the mid-tone area away from specular highlights. You might read #1E3A5F in HEX and rgb(30, 58, 95) in RGB.

Paste the hex color into your CSS custom property --brand-primary, then use the HSL readout to derive --brand-primary-light at higher lightness for hover states. Sample the backdrop gray separately for --surface-muted. Document both codes in your style guide so the team shares one source of truth.

Color format quick reference

FromToResult
HEXExample#3B82F6
RGBExamplergb(59, 130, 246)
HSLExamplehsl(217, 91%, 60%)
Image sampleBest forBrand match from photos
WheelBest forNew palette exploration

Complete guide to picking colors from images and hex codes

Why a color picker from image matters

Designers and developers constantly need to translate what they see on screen into values their tools understand. A color picker from image closes that gap: upload a screenshot, product photo, or brand asset, click a pixel, and read the hex color code or RGB channels instantly. No more squinting at a swatch and guessing whether the blue is closer to #3B82F6 or #2563EB.

This workflow shows up everywhere in real projects. Marketing hands you a hero banner and asks the landing page to match. A client sends a JPEG logo with no style guide. You are auditing a competitor site and want to sample their accent color for a mood board. In each case, sampling beats manual approximation.

Because processing happens on canvas in your browser, sensitive brand assets and unreleased photography never leave your device. That local model is especially important for agencies handling client work under NDA or teams working with pre-launch product shots.

How the image color sampler works

After you upload a file, the tool draws it to an off-screen canvas and reads pixel data with getImageData. Each click maps the pointer position to canvas coordinates and returns the red, green, and blue values at that exact pixel. The live swatch, HEX field, and RGB output update immediately.

Scroll the mouse wheel to zoom toward the cursor — essential when you need sub-pixel precision on retina screenshots or fine logo edges. Hold Shift and drag to pan around a zoomed image without changing the zoom level. A pixel loupe magnifies the neighborhood around your cursor so you can confirm you hit the right point.

Recent swatches remember your last picks inside the session. Sample a primary brand color, then an accent, then a neutral gray from the same photo, and flip between them without re-uploading.

Hex color picker and color by hex code

The manual tab doubles as a hex color code picker. Paste or type any #RRGGBB value, press Apply, and the swatch plus RGB and HSL fields sync. The native browser color input offers a visual shortcut when you already know the approximate hue but want to fine-tune saturation.

Hex colors remain the lingua franca of web CSS. A single six-digit code maps cleanly to design tokens, Tailwind theme extensions, and Figma variables. When you need a color by hex code from documentation — say a partner sends #E11D48 — paste it here to see the RGB breakdown before writing rgba() variants for shadows or borders.

HSL output helps when you need lighter or darker shades of the same hue. Designers often sample a base hex color, then adjust lightness in HSL for hover and disabled states without drifting to a different hue family.

RGB color picker output

RGB matters when your toolchain speaks in channels rather than hex. Android resources, some game engines, and print prep workflows often expect separate red, green, and blue integers from 0 to 255. The RGB color picker panel shows rgb(r, g, b) with a one-click copy button.

RGBA overlays — semi-transparent darkening layers on hero images, glassmorphism backgrounds, box shadows — are easier to reason about in RGB space. Sample the base color from a photo, then write rgba() with an alpha channel in your stylesheet.

If sampled values look off by a point or two, remember that JPEG compression, color profiles embedded in PNG, and monitor calibration all nudge pixels. Treat samples as design-token starting points, not legal proof of a Pantone match.

Color wheel and hex color selector

Not every color originates in a photograph. The wheel mode is a classic hex color selector for exploratory work: drag around the ring to set hue, move toward the center or edge for saturation, and use the brightness slider for lighter or darker shades. It is the fastest path when you are building a palette from scratch.

Wheel picking complements image sampling. Sample a dominant brand blue from a logo, then use the wheel to find a complementary accent or a desaturated neutral that harmonizes with the sampled hue. Recent swatches let you compare candidates without losing your anchor color.

HSV math powers the wheel internally, but the UI exposes HEX, RGB, and HSL because those are what most code and design tools consume. You do not need to think in hue degrees unless you want to.

Accessibility, contrast, and UI color

Picking a beautiful accent color is only half the job. Text on that background must meet WCAG contrast minimums — 4.5:1 for normal body copy, 3:1 for large headings. After sampling foreground and background colors from a mockup, run them through a contrast checker before shipping.

Do not rely on color alone to convey state. Error, success, and warning indicators need icons, labels, or patterns so color-blind users are not left guessing. A sampled red from a photo may look urgent on your monitor but fail against a dark theme without sufficient luminance difference.

Dark mode adds another layer. A hex color that reads fine on white may wash out on slate-900. Sample or define separate tokens for light and dark surfaces rather than reusing one value everywhere.

Supported formats and practical limits

JPEG, PNG, WebP, and GIF rasterize reliably on canvas. These cover the vast majority of photos, screenshots, and exported graphics you will sample in day-to-day work. Very large files are scaled down internally so the browser stays responsive — zoom still lets you target precise pixels.

SVG uploads may fail in some browsers because vector markup does not always decode to a drawable bitmap in canvas. If sampling a logo fails, export a PNG at 2× resolution from your design tool and upload that instead.

Animated GIFs sample the current frame only. For video frames, pause on the desired frame, take a screenshot, and upload the still. That extra step keeps the tool fast and predictable without video codec dependencies.

Detailed guide

Building a Tailwind palette from a hero photo

Upload the hero image and sample the dominant brand color plus one accent. Open your tailwind.config and add both under theme.extend.colors with semantic names like brand and brand-accent.

Use the HSL readout to create lighter variants for hover and focus rings — bump lightness by ten to fifteen points while holding hue steady. Verify body text contrast against the primary background before merging.

Store the sampled hex colors in a COMMENT block at the top of the config so future designers know which photo the tokens came from.

Matching UI to a client logo PNG

Request a PNG at least twice the display size of the logo slot. Upload it here, zoom into flat fill areas away from anti-aliased edges, and sample the core brand color.

Document the hex color code in your style guide alongside do-not-use variants — oversaturated samples from compressed JPEGs are a common mistake. Sample neutral grays from secondary logo areas for borders and chrome.

If the client only has a JPEG, sample multiple points and average mentally; prefer the value from the largest flat region.

Auditing colors from a competitor screenshot

Capture a full-page screenshot, upload it, and sample accent colors used on buttons and links. This is research for your own palette direction, not a license to copy trade dress wholesale.

Note both the hex colors and the contrast against adjacent backgrounds. Competitors sometimes fail accessibility guidelines — your implementation can do better with adjusted luminance.

Common questions

Color Picker FAQ

Is the Color Picker private?

Yes. Everything runs in your browser. Your input is not uploaded, logged, or stored on our servers.

Do I need an account?

No account or sign-up is required. Open the page and start using the tool immediately.

How do I use a color picker from image?

Upload PNG, JPG, or WebP, then click the image. The swatch and HEX/RGB/HSL fields update to that pixel. Scroll to zoom and Shift+drag to pan for precise sampling.

Does this work as a hex color picker?

Yes. Enter or paste any #RRGGBB value in the manual tab, use the native color input, or sample from an image. RGB and HSL update automatically.

Can I get RGB values from a photo?

Click any pixel after upload. The RGB color picker panel shows rgb(r, g, b) with a one-click copy button.

Are photos uploaded to a server?

No. Canvas and FileReader stay entirely in your browser.

Why do sampled colors differ from the real scene?

JPEG compression, color profiles, and monitor calibration change pixels slightly versus the original scene.

Which image formats are supported?

Common raster types: JPEG, PNG, WebP, and GIF. SVG may not render on canvas in all browsers.