🎨 Color Picker & Converter

Convert between HEX, RGB, HSL color formats. Generate color palettes and get color codes instantly.

#4f46e5

HEX

#4f46e5

RGB

rgb(79, 70, 229)

HSL

hsl(245, 73%, 59%)

CSS Variable

--color: #4f46e5;
About this tool

Free Online Color Picker

Pick any color and get its value in HEX, RGB, HSL, and HSB formats instantly. Click the color wheel, enter a HEX code, or adjust the sliders to find the exact color you need. Copy any format with one click. All color math runs locally in your browser.

Color Formats Explained

When to Use Each Format

HEX is standard for CSS and design handoff. RGB is useful when programmatically manipulating channels in JavaScript. HSL is best for building accessible color palettes — hold hue and saturation constant, vary lightness for shades and tints. CMYK applies only to print production (not shown in this tool).

How do I convert HEX to RGB?

Split the 6-digit hex into three pairs and convert each from hex to decimal. #4f46e5 → red: 0x4f=79, green: 0x46=70, blue: 0xe5=229 → rgb(79, 70, 229). This tool converts automatically — just enter your HEX value.

What contrast ratio do I need for accessible text?

WCAG 2.1 requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (18pt+ or 14pt bold) against their backgrounds. Use the color's lightness value as a quick proxy — large differences in HSL lightness generally indicate sufficient contrast.

How do I pick a color from an image or website?

In Chrome, click the color input in DevTools and select "Use the eye dropper" to sample any pixel on screen. On Mac, Digital Color Meter (Applications → Utilities) shows the hex value under your cursor at all times. Paste the result directly into this color picker.

Related Tools

More Dev Tools

Base64 EncoderBcrypt GeneratorCron ParserCSS MinifierCSV ⇄ JSONHash GeneratorColor Contrast Checker