Color Converter — HEX, RGB, HSL

Convert colors between HEX, RGB, and HSL formats. Pick a color visually or enter values directly. Copy CSS-ready color codes.

Your data never leaves your browser
R
G
B
H°
S%
L%

All Formats

CSS Usage

color: #3b82f6;
color: rgb(59, 130, 246);
color: hsl(217, 91%, 60%);

How to Use

  1. 1

    Enter a color

    Type a HEX value (e.g., #3b82f6), set RGB values with the number inputs, or pick a color with the color picker.

  2. 2

    See all formats

    The tool instantly shows the equivalent HEX, RGB, and HSL values, along with a color preview.

  3. 3

    Copy the format you need

    Click any format row to copy the CSS-ready value to your clipboard.

What is Color Converter?

Colors on the web are represented in several formats. HEX uses a # followed by 6 hexadecimal digits (#3b82f6). RGB specifies red, green, and blue channels as numbers from 0 to 255 — rgb(59, 130, 246). HSL describes color as hue (0-360°), saturation (0-100%), and lightness (0-100%) — hsl(217, 91%, 60%).

All three formats can represent the same colors — they're just different ways of describing the same value. HEX is the most common in CSS, RGB is intuitive for programmatic manipulation, and HSL is the most human-friendly for picking and adjusting colors.

This tool converts between all three formats in real time, shows a visual preview, and provides CSS-ready code snippets you can copy directly into your stylesheets.

FAQ

What HEX formats are supported?
Both 6-digit (#3b82f6) and 3-digit shorthand (#38f) formats are supported, with or without the # prefix.
What is the advantage of HSL over RGB?
HSL is more intuitive for humans. To make a color lighter, increase L. To desaturate, decrease S. To shift the hue, change H. With RGB, achieving these effects requires adjusting all three channels simultaneously.
Does this support alpha/transparency?
The current version converts between opaque colors. RGBA and HSLA with alpha channel support may be added in a future update.

Related Articles

Related Tools