Hex to RGB Converter
Convert hexadecimal color codes to RGB values instantly. Enter a hex color like #FF5733 and get the RGB equivalent. All conversions happen in your browser.
Synchronized color
#FF5733Parsed as RGB; malformed or out-of-range channels are rejected, never silently clamped.
Integer or percentage RGB, modern or legacy CSS, Hex with optional alpha, HSL, HSV, OKLCH, LAB, LCH, CMYK, or a CSS name.
Adjust channels
Share this exact input
?color=FF5733One input, implementation-ready output
Color workspace
Hex
#RRGGBB
#FF5733CSS RGB
Modern space syntax
rgb(255 87 51)Legacy RGB
Comma syntax
rgb(255, 87, 51)RGB %
Percentage channels
rgb(100% 34.1% 20%)HSL
CSS hue, saturation, lightness
hsl(11 100% 60%)HSV / HSB
Design-tool model
hsv(11, 80%, 100%)OKLCH
Perceptual CSS color
oklch(68% 0.21 33.7)LAB
CSS Lab, D50
lab(61.03% 63.55 55.96)LCH
CSS LCH, D50
lch(61.03% 84.67 41.37)CMYK
Unprofiled approximation
cmyk(0%, 66%, 80%, 0%)How to Convert Hex to RGB
A hex color code is three hexadecimal (base-16) numbers written back to back. Converting to RGB is just reading each pair as a decimal number:
- Split the 6-digit hex code into three pairs: RR (red), GG (green), BB (blue).
- Convert each pair from hexadecimal to decimal: multiply the first digit by 16 and add the second digit (A=10, B=11, C=12, D=13, E=14, F=15).
- Each result is a channel value from 0 to 255.
- Write the result as rgb(R, G, B).
Example: convert #FF5733 to RGB
FF → (15 × 16) + 15 = 255 (red)
57 → (5 × 16) + 7 = 87 (green)
33 → (3 × 16) + 3 = 51 (blue)
Result: rgb(255, 87, 51)
How to Use the Hex to RGB Converter
Enter your hexadecimal color code in the input field with or without the # symbol. The converter instantly displays the RGB equivalent, CSS rgb() output, HSL, and CMYK values. Click any copy button to copy the value to your clipboard. Your recent colors are saved for quick access.
Understanding Hex Color Codes
Hexadecimal color codes are six-digit codes that represent colors using base-16 notation. The first two digits represent red, the middle two represent green, and the last two represent blue. Each pair can range from 00 (0) to FF (255), creating over 16 million possible colors. This format was introduced in HTML 3.2 and remains the most common way to specify colors in web design.
Common Use Cases
Web developers use hex to RGB conversion when working with JavaScript color manipulation, CSS variables, or APIs that require RGB format. Designers often need to convert between formats when moving between different design tools. The RGB format is particularly useful for calculating color blends, adjusting brightness, and working with transparency.
Hex to RGB Conversion Table
Hex and RGB values for the most commonly used colors. Click any hex code to load it into the converter above.
| Color | Name | Hex | RGB |
|---|---|---|---|
| Black | #000000 | rgb(0, 0, 0) | |
| White | #FFFFFF | rgb(255, 255, 255) | |
| Red | #FF0000 | rgb(255, 0, 0) | |
| Lime | #00FF00 | rgb(0, 255, 0) | |
| Blue | #0000FF | rgb(0, 0, 255) | |
| Yellow | #FFFF00 | rgb(255, 255, 0) | |
| Cyan | #00FFFF | rgb(0, 255, 255) | |
| Magenta | #FF00FF | rgb(255, 0, 255) | |
| Silver | #C0C0C0 | rgb(192, 192, 192) | |
| Gray | #808080 | rgb(128, 128, 128) | |
| Maroon | #800000 | rgb(128, 0, 0) | |
| Olive | #808000 | rgb(128, 128, 0) | |
| Green | #008000 | rgb(0, 128, 0) | |
| Purple | #800080 | rgb(128, 0, 128) | |
| Teal | #008080 | rgb(0, 128, 128) | |
| Navy | #000080 | rgb(0, 0, 128) | |
| Orange | #FFA500 | rgb(255, 165, 0) | |
| Pink | #FFC0CB | rgb(255, 192, 203) | |
| Gold | #FFD700 | rgb(255, 215, 0) | |
| Brown | #A52A2A | rgb(165, 42, 42) | |
| Coral | #FF7F50 | rgb(255, 127, 80) | |
| Indigo | #4B0082 | rgb(75, 0, 130) | |
| Violet | #EE82EE | rgb(238, 130, 238) | |
| Salmon | #FA8072 | rgb(250, 128, 114) |
Need a value that is not listed? Browse the full color library — every hex code has a page with its RGB, HSL, CMYK and OKLCH values, contrast ratios, tints, shades and matching palette colors.
Frequently Asked Questions about Hex to RGB Converter
Hex (hexadecimal) uses a 6-character code starting with # to represent colors (e.g., #FF5733), while RGB uses three decimal numbers from 0-255 for red, green, and blue channels (e.g., rgb(255, 87, 51)). Both represent the same colors, just in different notation systems.
Split the hex code into three pairs (e.g., FF, 57, 33), then convert each pair from hexadecimal to decimal. FF = 255, 57 = 87, 33 = 51, giving you rgb(255, 87, 51).
Yes! Shorthand hex codes like #F53 are expanded by doubling each character, becoming #FF5533. Our converter handles both formats automatically.
Both work in CSS. Hex is more compact and traditional, while RGB is easier to read and modify programmatically. Modern CSS also supports rgb() with alpha transparency.
Keep the color moving
Useful next steps
Your latest color stays in the local workspace when the next tool uses it.
Color Converter
Convert one color into implementation-ready screen and print-reference formats
RGB to Hex Converter
Convert RGB and alpha to Hex, CSS formats, color spaces, code, and states
Hex to HSL Converter
Convert hex color codes to HSL values instantly
Hex to CMYK Converter
Convert hex color codes to CMYK values for print