Color Converter (HEX, RGB, HSL)

Convert colors between HEX, RGB, and HSL formats instantly. Use the HEX to RGB converter, RGB to HSL converter, or any combination. Enter a color value, use the color picker, or adjust sliders to find your perfect CSS color values. Perfect for developers and designers working with CSS color values.

HEX
#3b82f6
RGB
rgb(59, 130, 246)
HSL
hsl(217, 91%, 60%)

RGB Sliders

Red
Green
Blue

HSL Sliders

Hue
°
Saturation
%
Lightness
%
#HEX
Hexadecimal format
#3b82f6
RGB
Red, Green, Blue (0-255)
rgb(59, 130, 246)
HSL
Hue, Saturation, Lightness
hsl(217, 91%, 60%)

How to Use

1
Enter a color in any format (HEX, RGB, or HSL)
2
Or use the color picker to select a color
3
Or adjust the RGB/HSL sliders
4
Copy the converted values in your preferred format

Pro Tips

  • 💡Use this CSS color converter to quickly switch between formats for your stylesheets
  • 💡HSL to HEX conversion is great for creating color palettes - adjust Lightness for tints and shades
  • 💡RGB to HEX is useful when copying colors from design tools into CSS

Frequently Asked Questions

How do I convert HEX to RGB?

Enter your HEX color code (like #3b82f6) in the input field above. The converter instantly displays the equivalent RGB values. Click the copy button to copy the RGB value for your CSS.

Which color format should I use for CSS?

All three formats work in CSS. HEX (#3b82f6) is most common and compact. RGB is useful when you need opacity (rgba). HSL is best for programmatic adjustments since hue, saturation, and lightness can be changed independently.

All conversions happen locally in your browser. No data sent to servers.

Related Tools

Use your color values in JSON configuration files or store them safely with Base64 encoding.