Color Converter HEX ↔ RGB ↔ HSL

Color preview#1565C0
HEX#1565C0
RGBrgb(21, 101, 192)
HSLhsl(214, 80%, 42%)

Enter a color in HEX, RGB, or HSL format — the converter instantly updates all three formats simultaneously. Use the native color picker on the HEX tab to visually choose a color. Click "Copy" next to any format to copy the value to your clipboard. Useful for web developers, designers, and anyone working with CSS or design tools.

Advertisement

Your ad could be here

Contact us

Frequently Asked Questions

What is a HEX color code?

A HEX color is a six-digit hexadecimal value (e.g. #1565C0) that represents the red, green, and blue components of a color. Each pair of digits ranges from 00 to FF (0–255 in decimal). HEX is the most common format used in CSS and HTML.

What is the difference between RGB and HSL?

RGB describes a color by its red, green, and blue light components (0–255 each). HSL (Hue, Saturation, Lightness) is more intuitive: hue is the color angle (0–360°), saturation is the intensity (0–100%), and lightness controls how bright or dark the color is (0–100%). HSL is often easier to adjust when designing.

How do I convert HEX to RGB?

Split the 6-character HEX value into three pairs: the first pair is Red, the second is Green, the third is Blue. Convert each pair from hexadecimal to decimal. For example, #1565C0 → R=21, G=101, B=192. This converter does it automatically as you type.

Can I use a 3-digit HEX code?

Yes. A 3-digit HEX code like #1AC is shorthand for #11AACC, where each digit is doubled. This converter accepts both 3-digit and 6-digit HEX codes.

What are HEX colors used for?

HEX colors are used in CSS, HTML, SVG, and most design tools (Figma, Adobe XD, Photoshop). When building websites, you'll often need to switch between HEX and RGB/HSL — this tool saves time by converting all three formats at once.