RGB to Hex
Drag the sliders or type RGB values (0–255) to instantly get the HEX, RGB, and HSL color codes.
About RGB to Hex
The RGB to HEX Converter is a free online color conversion tool that translates RGB (Red, Green, Blue) color values into their corresponding HEX (hexadecimal) color codes. RGB values are used in CSS, design software and image editing applications, while HEX codes are the standard format for colors in HTML and many CSS properties.
Converting between these formats is a common daily task for web designers and front-end developers who work across different tools and code environments that use different color formats.
How to Convert RGB to HEX
- Enter your Red value (0–255)
- Enter your Green value (0–255)
- Enter your Blue value (0–255)
- Click Convert
- Copy the HEX color code (e.g. #FF5733)
How the Conversion Works
Each RGB channel (0–255) is converted to a two-digit hexadecimal number (00–FF). For example, RGB(255, 87, 51) converts to #FF5733:
- 255 → FF
- 87 → 57
- 51 → 33
Use our HEX to RGB Converter for the reverse direction. For a visual color picker with all format outputs simultaneously, try our Color Picker tool. All three tools are free with no login required.