Pickers

HEX Color Picker

Type or paste any HEX code — 3-digit or 6-digit — and the tool expands it, validates it and previews it live. Copy the RGB, HSL or CMYK equivalents in one click.

Preview

Accepts #RGB or #RRGGBB — the # is optional.

Examples

Converted values

RGB38, 125, 112
HSL170°, 53%, 32%
CMYK70%, 0%, 10%, 51%

What is a HEX color code?

A HEX color code is a six-digit hexadecimal number that describes a color in sRGB. Each pair of digits represents one channel — red, green and blue — and each pair can range from 00 to FF (0 to 255). A leading # indicates the start of the code. For example, #267D70 is 38 red, 125 green and 112 blue.

Three-digit shorthand

If each pair of digits is the same (e.g. #FFCC00), the code can be shortened to three digits: #FC0. This tool expands short HEX codes to their six-digit form automatically.

Why validate HEX codes?

Hex codes are strict. A single mistyped digit will produce an invalid color and browsers will silently drop it. This picker validates as you type — invalid codes show a clear error message and are never applied.

FAQ

Does this tool store my color?
Only locally in your browser's localStorage. Nothing is uploaded.
Can I share a color via URL?
Yes. The URL hash updates with every color (e.g. #267D70), so a bookmark or share will load the same color.
What if my HEX code has alpha?
8-digit HEX with alpha (e.g. #267D70FF) is a CSS Color Module Level 4 feature. This tool focuses on the 6-digit opaque form for clarity.

Related tools

Related encyclopedia