RGB to HEX Converter
Enter RGB values (0–255 each) and get the HEX color code instantly. Runs entirely in your browser. Our servers are not involved.
CONVERT
All three formats are shown simultaneously regardless of mode.
How it works
Each channel from 0 to 255 is written as two base-16 digits, and the three pairs are joined behind a #. 59 is 3 × 16 + 11, so it becomes 3b; 130 becomes 82 and 246 becomes f6, giving #3b82f6. Values below 16 get a leading zero, so rgb(0, 128, 0) becomes #008000. All conversion runs in JavaScript in your browser.
Processing runs in your browser
All computation happens inside your browser tab. Our servers are not involved at any point.
Related operations
To check whether two colours meet WCAG legibility, try the contrast checker. For building a coordinated set from one base colour, use the colour palette generator. To craft smooth multi-stop blends in CSS, see the CSS gradient generator.
Frequently asked questions
- What range can RGB values be?
- Each channel (red, green, blue) is a whole number from 0 to 255.
- What format is the HEX output?
- A 6-digit lowercase hex code prefixed with #, for example #3b82f6.
- What happens if a value is above 255?
- The converter shows no result until R, G and B are all numbers from 0 to 255. It does not clamp or guess a value.
- Can I paste rgb(59, 130, 246)?
- Type the three numbers into the R, G and B fields. The converter does not read rgb() strings.
Last reviewed September 30, 2026
Other pages for this tool
Related tools
- Background reading: Complete guide to color tools