Skip to main content

HEX to RGB Converter

Type or paste a HEX color: 3, 6 or 8 digits, with or without the #. A pasted CSS line works too.

rgb(255, 0, 0)
HEX:#FF0000
RGB:rgb(255, 0, 0)

CSS Usage:

background-color: rgb(255, 0, 0);
color: rgb(255, 0, 0);
border: 1px solid rgb(255, 0, 0);

Popular Examples:

How to Convert HEX to RGB

HEX to RGB conversion translates a hexadecimal color code (6 digits like #FF5733, or the 3-digit shorthand #F53; an 8-digit code adds a transparency pair, which this page sets aside) into three decimal values for Red, Green, and Blue (0–255). For example, #FF0000 becomes rgb(255, 0, 0). RGB notation is common in CSS and JavaScript — use it whenever you need to work with individual color channels.

Step by step for the color above

  1. Hex digits run 0–9, then A = 10, B = 11, C = 12, D = 13, E = 14, F = 15.
  2. Split #FF0000 into three pairs: FF · 00 · 00 (red, green, blue).
  3. Red: FF = 15 × 16 + 15 = 255
  4. Green: 00 = 0 × 16 + 0 = 0
  5. Blue: 00 = 0 × 16 + 0 = 0
  6. Result: rgb(255, 0, 0)

Why Use This Converter?

  • Instant real-time conversion
  • Free online tool - no registration required
  • Live color preview
  • CSS code examples
  • One-click copy to clipboard