HEX to RGB Converter
Enter a HEX color such as #1a73e8 to get its RGB value.
Free · Runs in your browser · Your text is never uploaded
How HEX becomes RGB
A HEX code is three pairs of hex digits: red, green and blue. Convert each pair to a number from 0 to 255. For #1a73e8: 1A is 26, 73 is 115 and E8 is 232, so the color is rgb(26, 115, 232).
Short and alpha forms
#fff expands to #ffffff. Eight digits such as #1a73e8cc add transparency.
Where this conversion helps
Developers convert HEX to RGB when a library, canvas API or image editor wants separate red, green and blue numbers, or when they need rgba() to add transparency to a brand color.
Common colors for reference
These values come from the CSS standard:
| Color | HEX | RGB | HSL |
|---|---|---|---|
| Black | #000000 | 0, 0, 0 | 0, 0%, 0% |
| White | #ffffff | 255, 255, 255 | 0, 0%, 100% |
| Red | #ff0000 | 255, 0, 0 | 0, 100%, 50% |
| Lime | #00ff00 | 0, 255, 0 | 120, 100%, 50% |
| Blue | #0000ff | 0, 0, 255 | 240, 100%, 50% |
| Yellow | #ffff00 | 255, 255, 0 | 60, 100%, 50% |
| Gray | #808080 | 128, 128, 128 | 0, 0%, 50% |
Check readability
A color is only useful if text stays legible on it. The converter shows contrast ratios against white and black; WCAG AA needs 4.5:1 for normal text. For a full explanation of every notation, see HEX, RGB and HSL color codes explained.
Need more options? Open the full Color Converter.
Related guides
Frequently asked questions
How do I convert HEX to RGB?
Paste the HEX code and read the RGB line.
Does the # matter?
No, it is optional.