HEX to RGB Converter

Convert HEX colour codes to RGB and HSL — or RGB back to HEX. Live colour preview. Click any result to copy.

HEX → RGB / HSL
RGB
HSL
RGB → HEX / HSL
R
G
B
HEX
HSL

How to Use

  1. HEX to RGB: use the colour swatch or type a HEX code into the HEX field.
  2. RGB to HEX: enter R, G, and B values (0–255) in the right panel.
  3. All outputs update in real time. Click any result box to copy its value.

What Is It?

HEX and RGB are two ways to represent the same colours in web design. HEX codes (#FF5733) are compact and used directly in HTML and CSS. RGB values rgb(255,87,51) are used in JavaScript, CSS rgb() functions, and graphic applications. HSL hsl(11,100%,60%) is preferred for programmatic colour manipulation because hue, saturation, and lightness are independent.

Why Use Our Tool?

  • Bidirectional: HEX→RGB and RGB→HEX in one interface.
  • Also outputs HSL for both directions.
  • Live colour preview swatch updates as you type.
  • Click any result box to copy — no separate copy button needed.

Frequently Asked Questions

  • A HEX colour code is a 6-digit hexadecimal number (e.g. #FF5733) representing the red, green, and blue components of a colour. Each pair of digits represents one colour channel from 00 (0) to FF (255).
  • Yes. Use the RGB → HEX panel, enter your R, G, B values (0–255), and get the HEX code instantly.
  • HSL stands for Hue, Saturation, Lightness. Hue is the colour angle (0–360°), saturation is colour intensity (0–100%), and lightness is brightness (0–100%). It is more intuitive than RGB for colour manipulation.
  • Yes, completely free.