## HEX to RGB converter (guide + examples)
HEX colors are written like `#RRGGBB`.
If you want to build a palette from a photo or logo, extract the colors directly:
Extract a Color Palette from an Image
Upload a JPG/PNG/WebP. Your image is processed in your browser (privacy-friendly). Copy HEX/RGB, download JSON, or share the result.
Palette
Details
FAQ
Is my image uploaded to the server?
No. The extraction runs in your browser via JavaScript. The file is not sent to our server by this tool.
How accurate is the palette?
It’s a pragmatic palette (k-means clustering on pixels). For gradients/noisy photos, results are approximate but usually very useful.
Can I use this for logos?
Yes. Logos with flat colors work extremely well. Use a smaller palette size (3–6) for clean results.
—
## Convert HEX to RGB
Split the HEX code into pairs:
– `RR` (red)
– `GG` (green)
– `BB` (blue)
Convert each hex pair to decimal (0–255).
### Example
HEX: `#2563eb`
– 25 → 37
– 63 → 99
– eb → 235
RGB: `rgb(37, 99, 235)`
—
## FAQ
### What about 3-digit HEX?
`#abc` expands to `#aabbcc`.
### Do HEX codes support alpha?
Sometimes. `#RRGGBBAA` is used in modern CSS, where `AA` is alpha.
## Related pages
– RGB to HEX: /rgb-to-hex/
– HEX to HSL: /hex-to-hsl/
## Related tools
– Extract colors from image: /extract-colors-from-image/
– Palette from image: /palette-from-image/
– Extract dominant color: /dominant-color-from-image/
– Extract logo colors: /extract-logo-colors/
– CSS color palette: /css-color-palette/
– HEX guide: /hex-color-picker-palette-guide/