RGB to HEX Color Converter
Convert between RGB color values and hexadecimal color codes with live preview
Color Converter
RGB Values
Hexadecimal Code
#
How to Use RGB to HEX Color Converter
RGB to HEX Conversion
- Adjust the RGB sliders or enter values directly in the number inputs (0-255)
- The hexadecimal code will update automatically
- The color preview will show the current color
HEX to RGB Conversion
- Enter a valid hexadecimal code in the input box (with or without the # symbol)
- The RGB sliders and values will update automatically
- The color preview will show the current color
Tips
- Valid hex codes contain 6 characters (0-9 and A-F)
- 3-character shorthand codes (like #ABC) are also supported
- RGB values must be whole numbers between 0 and 255
Common Colors & Examples
#FF0000
RGB(255, 0, 0)
#00FF00
RGB(0, 255, 0)
#0000FF
RGB(0, 0, 255)
#FFFF00
RGB(255, 255, 0)
#800080
RGB(128, 0, 128)
#FFC0CB
RGB(255, 192, 203)
#333333
RGB(51, 51, 51)
#FFA500
RGB(255, 165, 0)
About Color Formats
RGB Format
RGB (Red, Green, Blue) is an additive color model in which red, green, and blue light are added together in various ways to reproduce a broad array of colors.
- Each component has a range from 0 to 255
- RGB(255, 255, 255) is white
- RGB(0, 0, 0) is black
Hexadecimal Format
Hexadecimal color codes are a way to represent RGB colors using the base-16 number system. Each pair of digits represents one component (red, green, or blue).
- Format:
#RRGGBB
where RR is red, GG is green, and BB is blue - Each component ranges from 00 to FF in hexadecimal (0-255 in decimal)
- For example,
#FF0000
is pure red - Shorthand notation:
#RGB
where each digit is duplicated (e.g.,#F00
equals#FF0000
)