RGB & HEX Converter
Convert RGB to HEX or HEX to RGB as you type. Preview the color and copy HEX, RGB, HSL, HSV, or a CSS color declaration.
What is RGB & HEX Converter?
Convert a single color in either direction. RGB channels range from 0 to 255; HEX accepts three or six digits, with or without the #.
How to use
- 1
Enter red, green, and blue values from 0 to 255, or type a 3- or 6-digit HEX code.
- 2
Check the live color preview and conversion. For example, RGB(59, 130, 246) gives #3B82F6.
- 3
Copy a color value or choose a format under Copy CSS.
Common Use Cases
- 1
Convert a designer's HEX color code to RGB values for use in CSS rgba() with opacity
- 2
Translate RGB values from a design system token into the HEX codes required by a brand guide
- 3
Verify that a color conversion is lossless when moving between HEX and RGB representations
- 4
Quickly look up the RGB components of a known HEX color without memorizing the formula
- 5
Convert colors between formats when working with multiple design tools that use different notations
Try an Example
Example Input
RGB(59, 130, 246)
Expected Output
#3b82f6
Frequently Asked Questions
Can I convert HEX back to RGB?
Yes. Enter a HEX code and the RGB fields and other outputs update automatically.
Does this support transparency or batch conversion?
No. It converts one opaque color at a time. HEX codes with an alpha channel are not accepted.