Color

HEX to RGB Color Converter

Convert HEX color codes to RGB and vice versa online for free. Also converts to HSL and CSS color formats.

#3B82F6
rgb(59, 130, 246)
hsl(217, 91%, 60%)

HEX

RGB

About this tool

The HEX to RGB Color Converter instantly converts between HEX color codes (#RRGGBB), RGB values (rgb(255, 255, 255)), and HSL values. Essential for web designers and front-end developers working with CSS colors. Displays a live color preview so you can see exactly what color you are working with. Also generates the CSS color string ready to paste into your stylesheet.

How to use HEX ↔ RGB

  1. 1
    Enter a HEX code: Type a HEX color code like #FF5733 to see its RGB and HSL equivalents.
  2. 2
    Or enter RGB values: Enter R, G, B values (0-255) to get the HEX code.
  3. 3
    See the color preview: A live color swatch shows exactly what the color looks like.
  4. 4
    Copy the CSS value: Copy the HEX, RGB, or HSL value directly for your CSS.

Frequently Asked Questions

What is a HEX color code?

A HEX color code is a six-digit hexadecimal number preceded by #, representing the red, green, and blue components of a color (e.g., #FF5733).

What is the difference between RGB and HEX colors?

RGB uses decimal values 0-255 for each channel. HEX uses the same values expressed in hexadecimal. They represent the same colors, just in different notations.

What is HSL?

HSL stands for Hue, Saturation, and Lightness — an alternative way to represent colors that is often more intuitive for adjusting colors programmatically.

Related Tools