← Imperial Products / Tools / Color Converter

Color Converter

Convert between HEX, RGB, HSL, and CSS named colors instantly. Real-time preview, one-click copy, and a full CSS color palette reference — all 100% in your browser.

Color Preview
Click swatch to open native color picker
Luminance —
Contrast on white —
Contrast on black —
Best text color —
HEX
RGB
R
G
B
HSL
H (0-360)
S (%)
L (%)
CSS Named Color
Nearest match:
—

CSS Named Color Palette — click any chip to load it

Reds & Pinks
Oranges & Yellows
Greens
Blues & Purples
Browns & Neutrals
Grays & Whites

How Color Formats Work

Web colors can be expressed in several equivalent formats. This tool converts between all of them in real time, directly in your browser — no server, no network request, no data ever leaves your device.

HEX Colors

HEX is the most common format in CSS and design tools. It encodes red, green, and blue channels as two hexadecimal digits each, giving 256 values per channel. The leading # is optional in some contexts. 3-digit shorthand (#abc) expands to #aabbcc. An optional 4th byte adds an alpha channel (#RRGGBBAA).

RGB Colors

RGB specifies red, green, and blue as integers from 0 to 255. It maps directly to how monitors produce light. The CSS function form rgb(201, 168, 76) is widely supported. The modern space-separated syntax rgb(201 168 76) and rgb(201 168 76 / 0.8) for alpha are supported in all modern browsers.

HSL Colors

HSL (Hue, Saturation, Lightness) is a human-friendly model. Hue is an angle on the color wheel (0–360°), Saturation is the intensity (0–100%), and Lightness is the brightness from black (0%) to white (100%). HSL makes it easy to create color variations — just adjust lightness to get tints and shades without touching hue or saturation.

CSS Named Colors

CSS defines 148 named colors, from aliceblue to yellowgreen. They are case-insensitive and are mapped to specific HEX values in the CSS specification. This tool finds the nearest named color to any HEX or RGB value using Euclidean distance in RGB space.

Common Use Cases

More Free Developer Tools