RGB to HEX Converter

Convert colors between RGB, HEX and HSL with live preview

#2563EB
← Click to open color picker
RGB Values (0–255)
R
G
B
HEX Code
HSL (read-only — click to copy)
hsl(221, 83%, 53%)
Common Web Colors
How to Use the Color Converter
1
Click the color picker or enter RGB values (0–255) or a HEX code
2
All formats update instantly — HEX, RGB, and HSL
3
Click any Copy button to copy that format to clipboard
4
Click any swatch in the library to load a common web color
About Color Formats

HEX colors like #2563EB are 6-character codes used in CSS and web design. Each pair of characters (25, 63, EB) represents the Red, Green, and Blue values in hexadecimal. RGB uses decimal values 0–255 for each channel and is used in CSS as rgb(37, 99, 235). HSL (Hue, Saturation, Lightness) is more intuitive for humans — hue is 0–360° on the color wheel, saturation and lightness are 0–100%.

Frequently Asked Questions
Convert each RGB value (0–255) to a 2-digit hexadecimal number. For example, R=37 → 25, G=99 → 63, B=235 → EB, giving #2563EB. Use this tool to convert instantly without manual calculation.
They represent the same colors in different formats. HEX is more compact (7 characters vs 16+) and commonly used in CSS. RGB is easier to understand and manipulate programmatically. Both are fully supported in all modern browsers.
#FFFFFF is white (RGB 255, 255, 255 — all channels at maximum). #000000 is black (RGB 0, 0, 0 — all channels at zero). #FF0000 is pure red, #00FF00 is pure green, #0000FF is pure blue.