Tool
HEX to RGB Converter
Paste a hex color code and instantly get the red, green, and blue values. Click the colour swatch to use a visual picker.
rgb(28, 96, 246)color: rgb(28, 96, 246);Convert HEX to RGB in three steps
No sign-up. Works instantly in any browser.
Enter a hex color code
Type or paste any hex value — #1c60f6 or 1c60f6, with or without the #.
See the RGB values
Red, green, and blue values from 0–255 appear instantly.
Copy the values
Copy as rgb(28, 96, 246) for CSS or as individual R, G, B numbers.
HEX to RGB
Instant conversion
Type any hex code and RGB values appear immediately.
Copy-ready formats
Copy as rgb() for CSS or individual R, G, B values.
Color preview
Live preview of the color to confirm it's the right shade.
About the HEX to RGB Converter
HEX and RGB are two ways of expressing the same thing — a colour made from red, green, and blue channels. HEX is the shorthand used in HTML and CSS (like #1c60f6). RGB is the numerical form that some design tools, image editors, and programming libraries require.
Each pair of characters in a hex code represents one colour channel in base 16. The first two digits are red, the middle two are green, and the last two are blue. Converting to RGB gives you three numbers between 0 and 255 — the exact values each channel is set to.
This tool also outputs the CSS-ready rgb() function so you can paste it directly into your stylesheet.
You can also enter a 3-character shorthand hex code — #abc expands to #aabbcc. This comes up in CSS shorthand where #fff means white and #000 means black.
Need the reverse? Convert RGB to HEX →
Explore more free tools: RGB to HEX · Color Picker · JPG to PNG
More Color Tools
Frequently Asked Questions
What is a hex color code?
#RRGGBB — each pair represents red, green, blue on a scale from 00 (none) to FF (full). #FF0000 is pure red, #000000 is black, #FFFFFF is white.
How do I convert hex to RGB manually?
Split into three 2-character pairs and convert each from hexadecimal to decimal. FF=255, 00=0, 80=128. #FF8000 = rgb(255, 128, 0).
What's the difference between 3-digit and 6-digit hex codes?
#RGB is shorthand for #RRGGBB where each digit repeats. #F06 = #FF0066. Only works when each hex pair would be a repeated digit.
Does the # matter in a hex code?
In CSS it's just a prefix indicating hexadecimal. Some tools require it, others don't — this converter accepts both.