Color Converter

Convert any color between HEX, RGB, and HSL. Pick a color or type a value — all formats stay in sync with a live preview.

How it works

HEX is the six-digit code used in CSS and HTML, RGB describes a color by its red, green, and blue channels (0–255), and HSL describes it by hue (0–360°), saturation, and lightness — handy when you want to tweak brightness without changing the hue. Edit any field and the others update automatically.

How to use

  1. Click the Pick a color color picker to choose visually — the preview swatch and all three fields update instantly.
  2. Or type directly into any field: HEX accepts codes like #1d4ed8 or the 3-digit shorthand #abc, RGB takes three numbers like 29, 78, 216, and HSL takes values like 224, 76%, 48%.
  3. Editing one field re-syncs the other two, so you can hop between formats freely.
  4. Use the Copy HEX, Copy RGB, and Copy HSL buttons to grab ready-to-paste CSS values — RGB copies as rgb(29, 78, 216) and HSL as hsl(224, 76%, 48%).

Frequently asked questions

What does #FF0000 look like in RGB and HSL?

Pure red #FF0000 converts to rgb(255, 0, 0) — the red channel maxed out, green and blue at zero — and hsl(0, 100%, 50%), i.e. hue 0° (red), full saturation, half lightness.

What is 3-digit HEX shorthand?

Each digit is doubled: #abc is exactly the same color as #aabbcc. It only works when each pair of digits repeats, and this tool accepts it in the HEX field just like the full six-digit form.

When should I use HSL instead of RGB?

HSL describes a color by hue (0–360°), saturation, and lightness, so it's the friendlier format when you want to lighten, darken, or desaturate a color without changing its hue. RGB is better when you need exact channel values or are matching a spec.

Why are RGB values 0–255?

Each channel fits in one byte (8 bits), and 8 bits can hold the values 0 through 255. A channel of 0 means none of that color; 255 means the maximum. The tool rejects anything outside that range with an error message.