Hex to RGB Converter
Convert between HEX, RGB, and HSL color codes instantly with live preview.
#B9502Argb(185, 80, 42)hsl(16, 63%, 45%)How to convert HEX to RGB
A HEX color code like #B9502A is a three-pair hexadecimal number. Convert each pair from base-16 to base-10: B9 = 185, 50 = 80, 2A = 42. The result is rgb(185, 80, 42). This tool does the conversion instantly as you type.
Color format comparison
| Format | Syntax | Best For |
|---|---|---|
| HEX | #RRGGBB | CSS shorthand, design specs |
| RGB | rgb(R, G, B) | CSS, dynamic color manipulation |
| HSL | hsl(H, S%, L%) | Adjusting brightness, creating palettes |
Frequently Asked Questions
What is the difference between HEX and RGB?
HEX and RGB represent the same colors in different notations. HEX uses a 6-digit hexadecimal string (#FF0000), while RGB uses three decimal values from 0–255 (rgb(255, 0, 0)). Both define red, green, and blue channel intensities.
When should I use HSL instead of RGB?
HSL (Hue, Saturation, Lightness) is more intuitive for creating color variations. To make a color lighter, increase L. To desaturate, decrease S. This makes HSL ideal for generating consistent color palettes and themes.
Related free tools
Browse all toolsFormat, validate, and beautify JSON instantly. Find syntax errors with line numbers. JSON linter.
Encode text to Base64 or decode Base64 strings back to plain text. Supports unicode and images.
Encode or decode URLs and query strings. Handle special characters safely. URL validator.
Generate random UUIDs (v4 and v7). Bulk generate up to 50 at once with custom formatting.