Hex to RGB Converter

Convert hexadecimal color codes to RGB values instantly with live color preview. Free online Hex to RGB converter tool.

#
Swap

How to convert Hex to RGB?

Hexadecimal color codes are 6-digit codes representing colors in web design. The first two digits represent red, the middle two represent green, and the last two represent blue. Each pair is a hexadecimal number (base 16) ranging from 00 to FF.

To convert Hex to RGB:
1. Take the first two hex digits and convert to decimal (0-255) for Red
2. Take the middle two hex digits and convert to decimal for Green
3. Take the last two hex digits and convert to decimal for Blue

Example: #FF5733
- Red: FF = 255
- Green: 57 = 87
- Blue: 33 = 51
Result: RGB(255, 87, 51)

What is a hexadecimal color code?

A hexadecimal color code is a 6-character code used in HTML, CSS, and design software to represent colors. It starts with # followed by 6 hexadecimal digits (0-9, A-F). The format is #RRGGBB, where RR is red, GG is green, and BB is blue. For example, #FF0000 represents pure red.

Why use hexadecimal for colors?

Hexadecimal notation is compact and efficient for web development. It represents 256 values (0-255) using just 2 characters, making color codes short and easy to share. It's the standard format in CSS, HTML, and most design tools, allowing designers and developers to communicate colors precisely.

What is the difference between 3-digit and 6-digit hex codes?

3-digit hex codes (#RGB) are shorthand for 6-digit codes where each digit is repeated. For example, #F00 equals #FF0000, and #ABC equals #AABBCC. This shorthand is useful for simple colors but doesn't offer the full range of 16.7 million colors that 6-digit codes provide.

How many colors can hex codes represent?

6-digit hexadecimal codes can represent 16,777,216 different colors (256 × 256 × 256). This is because each of the three color channels (Red, Green, Blue) can have 256 different values (00 to FF in hexadecimal, or 0 to 255 in decimal), providing sufficient color depth for most digital applications.

Common Hex to RGB Conversions

Preview Color Hex RGB
  Black #000000 (0, 0, 0)
  White #FFFFFF (255, 255, 255)
  Red #FF0000 (255, 0, 0)
  Lime #00FF00 (0, 255, 0)
  Blue #0000FF (0, 0, 255)
  Yellow #FFFF00 (255, 255, 0)
  Cyan #00FFFF (0, 255, 255)
  Magenta #FF00FF (255, 0, 255)
  Silver #C0C0C0 (192, 192, 192)
  Gray #808080 (128, 128, 128)
  Maroon #800000 (128, 0, 0)
  Olive #808000 (128, 128, 0)
  Green #008000 (0, 128, 0)
  Purple #800080 (128, 0, 128)
  Teal #008080 (0, 128, 128)
  Navy #000080 (0, 0, 128)