Tools

Home
JSON FormatterSQL FormatterJS ValidatorMinify CSS
Merge PDFCompress PDFImage to PDF
JPG to PNGPNG to WebPCrop Image

Convert Png To HSL Colors

Upload a PNG image, click on pixels to see HSL (Hue, Saturation, Lightness) values, and build a palette of unique colors.

Your files never leave your browser
Drop PNG image here or click to upload
Supports PNG files (max 50 MB)
Click on the image to inspect a pixel

Picked Color Palette

0 colors

Click any pixel in a PNG to pull its exact HSL values — hue, saturation, lightness — the color format that matches how you actually think about tweaking tones. Each click adds a unique swatch to a palette you can export as CSS custom properties in one go. And everything runs in your browser. Nothing gets uploaded.

How It Works

Drop PNG Image
➔
Click Any Pixel
➔
Get HSL + Build Palette

The browser draws your PNG onto a hidden canvas element. When you click a spot, it reads the RGBA values of that single pixel, runs the standard RGB-to-HSL conversion, and shows hue (0–360°), saturation (0–100%), and lightness (0–100%). Each new color gets added to a de-duplicated palette you can export as CSS variables with one button.

Examples

Pulling Brand Colors from a Logo

A designer received a client's logo as a PNG with no style guide. Click each distinct color area to extract the brand palette.

INPUT
Click on dark blue area of logo Pixel: (142, 58)
OUTPUT
hsl(217, 89%, 29%) RGB: rgb(8, 43, 140) HEX: #082b8c

Checking Contrast Between Text and Background

You screenshot a page and want to know if the lightness gap between heading text and its background meets WCAG standards.

INPUT
Click heading text pixel Click background pixel
OUTPUT
Text: hsl(220, 15%, 20%) → L:20% BG: hsl(220, 10%, 95%) → L:95% Difference: 75 lightness points

Building a Sunset Gradient from a Photo

You want a CSS gradient that matches a sunset photo. Click across the sky from left to right, sampling five or six colors, then export the palette.

INPUT
Click 5 pixels across sky: (40,80) (160,70) (300,60) (440,55) (580,50)
OUTPUT
--color-1: hsl(35, 92%, 58%); --color-2: hsl(22, 88%, 52%); --color-3: hsl(10, 78%, 45%); --color-4: hsl(340, 62%, 38%); --color-5: hsl(270, 45%, 30%);

Who Uses This

👨‍💻 Front-End Developers

Extract exact HSL values from mockup PNGs so CSS matches the design file pixel-for-pixel.

🎨 UI Designers

Sample colors from competitor screenshots or inspiration boards to build mood palettes fast.

♿ Accessibility Auditors

Compare lightness values between text and background pixels to check contrast ratios.

📷 Photographers

Identify dominant hues in a shot to match editing presets or plan complementary overlays.

Common Mistakes

Clicking anti-aliased edges instead of solid areas

Edges between two colors blend into a third color that doesn't exist in the original design. Click the middle of a color region, not the border. You'll get the true value instead of a blended artifact.

Confusing lightness 50% with "normal"

Lightness 50% is the pure, fully saturated version of a hue — not "medium brightness" the way most people expect. A lightness of 40–45% often looks more natural for body text colors. Go lower than you think.

Uploading a JPEG and wondering why colors look off

JPEG compression smears nearby pixel colors together. A solid blue button in a JPEG might have 15 slightly different blues around its edges. Use the original PNG whenever possible — it stores pixels without compression artifacts.

Technical Details

Frequently Asked Questions

What is the HSL color model and why use it over RGB?

HSL stands for Hue, Saturation, and Lightness. Hue is the color angle on a 360° wheel, saturation controls how vivid or gray it looks, and lightness sets how dark or bright it is. The reason it beats RGB for design work is simple: want a lighter shade? Bump lightness up. In RGB, you'd have to adjust all three channels and hope for the best.

Can I use HSL values directly in my CSS?

Yes — drop them straight into hsl(). Something like hsl(210, 80%, 50%) gives you a vivid blue. Need transparency? Use hsla(210, 80%, 50%, 0.5). The export button on this tool copies your whole palette as CSS custom properties, ready to paste into a stylesheet.

Is my image uploaded to any server?

No. Your image stays on your machine the entire time. The tool reads pixel data through the browser's Canvas API — nothing gets sent anywhere, not even temporarily. Close the tab and it's gone from memory.

Does this work with JPEG or WebP files too?

It does. Any image format your browser can display will work here. That said, PNG is the best choice because it stores colors without compression artifacts. JPEGs smear nearby colors together, so a "solid red" button might read as five slightly different reds depending on where you click.

How do I create color variations from a sampled HSL value?

Keep the hue the same and adjust the other two numbers. For a lighter tint, raise lightness by 15–20 points. For a muted version, drop saturation by 20–30 points. That is the whole advantage of HSL — one number changes one thing. Hover states, disabled buttons, backgrounds — all easy to derive once you have the base value.

Share: