🏠 HomeAboutContact
🎨

Hex to RGB Converter

Utility

Convert HEX color codes to RGB, RGBA, and HSL values with a live color preview. Also supports RGB to HEX conversion and color picker.

Advertisement

🎨 Color Picker

Click to pick any color
#6EE7B7

HEX → RGB / HSL

RGB → HEX

Advertisement

What are HEX and RGB Color Codes?

HEX (hexadecimal) and RGB (Red, Green, Blue) are two of the most common ways to represent colors in digital design and web development. Both systems can represent the same set of colors — 16,777,216 possible colors in total — but in different formats suited for different use cases.

HEX codes are 6-character strings prefixed with a # symbol (e.g., #6ee7b7). Each pair of characters represents the intensity of Red, Green, and Blue channels in hexadecimal (base-16) notation. They are commonly used in HTML, CSS, and design tools.

RGB values express each color channel as a decimal number from 0 to 255. For example, rgb(110, 231, 183) represents the same color as #6ee7b7. RGB is used extensively in CSS, image editing software, and programming.

Understanding Color Channels

Frequently Asked Questions

When should I use HEX vs RGB in CSS?+
Both work equally in modern CSS. HEX is more compact and commonly used for solid colors in stylesheets. RGB is preferred when you need to add transparency (using RGBA) or perform dynamic color manipulation in JavaScript. For example, rgba(110, 231, 183, 0.5) makes a color 50% transparent — not possible with HEX without additional syntax.
What is the difference between RGB and RGBA?+
RGBA adds an Alpha channel to RGB, controlling the color's transparency. The alpha value ranges from 0 (fully transparent) to 1 (fully opaque). For example, rgba(110, 231, 183, 0.5) is 50% transparent, while rgba(110, 231, 183, 1) is fully opaque — identical to rgb(110, 231, 183).
What is HSL color?+
HSL stands for Hue, Saturation, and Lightness. It is another color model that many designers find more intuitive. Hue is expressed as degrees (0–360 on a color wheel), Saturation as a percentage (0% = grey, 100% = full color), and Lightness as a percentage (0% = black, 100% = white, 50% = normal). Our tool converts colors to HSL as well.
Can I use 3-digit HEX codes?+
Yes. A 3-digit HEX code is a shorthand where each digit is doubled. For example, #abc is the same as #aabbcc, and #fff is the same as #ffffff (white). Our tool accepts both 3-digit and 6-digit HEX codes and converts them correctly.