Developer Tools

Color Converter (HEX / RGB / HSL)

Convert HEX, RGB and HSL colors instantly with a live swatch preview.

Tool

About the Color Converter

The Color Converter runs entirely in your browser — your code and data never leave your machine. Paste, click, copy the result.

Designers think in HSL (hue, saturation, lightness), CSS variables often use HEX, and inline styles use RGB. This converter syncs all three formats at once: edit any field and the others update, with a live swatch so you can see exactly what you're converting.

How to use this tool

  1. Enter a HEX color (with or without the #), or use the picker.
  2. Or type R/G/B or H/S/L values directly.
  3. Press Convert (fields also update as you type).
  4. Copy any format from the output box.

Format reference

FormatExampleNotes
HEX#4f46e56 digits (RRGGBB); 3-digit shorthand expands pairs
RGBrgb(79, 70, 229)0–255 per channel; alpha via rgba(…,0.5)
HSLhsl(243, 75%, 59%)Hue 0–360°, S/L 0–100% — easiest to adjust

Why HSL changes everything

Need a lighter version of a brand color? In HSL, raise L by 10% and keep H and S — guaranteed harmonious shades. Need a complementary color? Add 180° to the hue. Try doing that from a HEX value in your head.

  • Same color, different names: indigo-600 (#4f46e5) = Tailwind's indigo-600.
  • Opacity: append alpha: rgba(79,70,229,0.35).

Who is this tool for?

Front-end developers matching brand colors, designers building palettes, and anyone who has ever squinted at #e63946 trying to guess its RGB.

Developer tip

Build palettes in HSL: fix the hue, vary only L for shades and S for muted tones — instant consistency across your UI.

Frequently asked questions

CSS shorthand doubles each digit: #abc → #aabbcc. The converter shows the full 6-digit form, which works everywhere.
Use rgba() or hsl() with an alpha channel — e.g. rgba(79,70,229,0.4). HEX8 (#4f46e566) also works in modern browsers.
HSL uses Lightness (mix with white/black); HSV uses Value (mix with black). Design tools vary — this converter uses the CSS standard HSL.

Related tools

Guides for this tool