← Back to tools
Converter

Color Converter

Convert between HEX, RGB, and HSL formats.

CSS: rgb(99, 102, 241)

How the Color Converter Works

This color converter translates color codes between HEX, RGB (Red, Green, Blue), and HSL (Hue, Saturation, Lightness) formats. Enter a value in any format to see the equivalents in the other formats and view a live color preview.

Formula Used

HEX ↔ RGB ↔ HSL conversion formulas
HEX
— a six-digit hexadecimal representation of colors (e.g. #3498db)
RGB
— color defined by Red, Green, and Blue intensities from 0 to 255
HSL
— color defined by Hue (0-360°), Saturation (0-100%), and Lightness (0-100%)

Example Calculation

If you enter the HEX value '#3498db', the converter translates it: RGB = (52, 152, 219); HSL = (204°, 70%, 53%). It also displays a blue preview block.

Frequently Asked Questions