Hex to RGB Converter

The Hex to RGB Converter reads the code you enter into Hex Color and breaks it down into its red, green, and blue components. Click Convert and the values appear in RGB Output, formatted as rgb(...) and ready to use in your CSS. Use the ip address to hex converter when a network log or firmware config expects an IPv4 address written out in hex.

How to Change Hex Colors to RGB Instantly with a Hex to RGB Converter

Need to translate a hex color code into its RGB equivalent for a design, a CSS stylesheet, or a digital asset? Developers and designers rely on real-time hex to RGB conversion for consistent color handoff across every platform a project touches. The fastest way to check a binary value against its hex equivalent is to paste it into the binary to hex converter and click Convert.

Hex to RGB Color Converter – Usage Instructions

  • Type or paste your hex color code into the Hex Color field—for example, #FF6600—and the RGB Output field updates with the matching rgb(r, g, b) triplet as you type.
  • Supports two common formats: #rrggbb (6-digit hex) and #rgb (3-digit hex shorthand).
  • The result is always shown in classic rgb(r, g, b) syntax, ready to paste directly into HTML/CSS code, canvas, WebGL, or SVG.
  • No registration, no downloads, and free for unlimited use.
  • Click Convert to trigger the conversion manually, or just watch the RGB values appear as you type.

Supported Hex Color Formats

  • 6-digit hex color code: #RRGGBB (e.g., #394DFE or 394DFE, with or without the leading #)
  • 3-digit hex shorthand: #RGB (e.g., #39f, automatically expanded to #3399FF before converting)
  • RGB output: rgb(255, 87, 51) — a plain (r, g, b) triplet
How does the conversion work?

A hex color code encodes three channel values—red, green, and blue—as three pairs of hexadecimal digits. To convert hex to RGB:

  1. Split the hex code into its first pair (red), middle pair (green), and last pair (blue).
  2. Convert each pair to decimal: Each hex pair (base-16) converts to a number from 0–255 (base-10).
  3. Assemble the result as rgb(R, G, B).

This converter handles standard opaque colors—3-digit and 6-digit hex in, rgb(r, g, b) out. If you need to include transparency, use the Hex to RGBA Converter instead, which reads an 8-digit hex code and returns an rgba(r, g, b, a) value with the alpha channel included.

Worked Examples
  1. User enters: #FF5733
    Split: FF (red), 57 (green), 33 (blue)
    Hex to decimal: FF = 255, 57 = 87, 33 = 51
    Result: rgb(255, 87, 51)
  2. Developer palette for CSS: Converting #39f and #394DFE:
    • #39frgb(51, 153, 255)
    • #394DFErgb(57, 77, 254)
  3. Designer comparison: How does #39f look as RGB?
    • Expand #39f to #3399ff; then R=51, G=153, B=255
    • Result: rgb(51, 153, 255)—a bright azure blue, useful for UI accent colors
Infographic showing how to convert hex #2F8F5B to RGB: split into three 2-digit hex pairs and convert each pair to decimal to get rgb(47, 143, 91)
Hex to RGB Converter: #2F8F5B = rgb(47, 143, 91)

Comprehensive Hex to RGB Conversion Table for Common Colors

Reference this hex to RGB color converter chart to look up common hex color codes, their exact RGB values, and the recognized color name. This quick guide is handy for developers, designers, and anyone working with HTML/CSS colors or digital palettes. Paste a value into the BCD (Binary) Input field of the bcd to decimal converter to see the decoded digits in Decimal Output.

Common Color Codes and Their Equivalents — Hex Color Table

Color NameHexRGBSample
Black#000000rgb(0, 0, 0) Black 
White#ffffffrgb(255, 255, 255)White
Red#ff0000rgb(255, 0, 0)Red
Lime#00ff00rgb(0, 255, 0)Lime
Blue#0000ffrgb(0, 0, 255)Blue
Yellow#ffff00rgb(255, 255, 0)Yellow
Cyan#00ffffrgb(0, 255, 255)Cyan
Magenta#ff00ffrgb(255, 0, 255)Magenta
Silver#c0c0c0rgb(192, 192, 192)Silver
Gray#808080rgb(128, 128, 128)Gray
Maroon#800000rgb(128, 0, 0)Maroon
Olive#808000rgb(128, 128, 0)Olive
Green#008000rgb(0, 128, 0)Green
Purple#800080rgb(128, 0, 128)Purple
Teal#008080rgb(0, 128, 128)Teal
Navy#000080rgb(0, 0, 128)Navy
Gold#ffd700rgb(255, 215, 0)Gold

This hex color table lets you instantly compare named colors, identify their codes, and find matches for any palette or digital project you're working on.

Hex to RGB Conversion FAQs and Supported Color Code Formats

What is an RGB value, and why convert from hex?
  • An RGB value is a set of three integers (for red, green, and blue) between 0 and 255 that represent color intensity. It's used widely in HTML and CSS as rgb(r, g, b) syntax. Hex to RGB conversion is essential for web, UI, and digital design work.
  • Some projects—like programmatically generating themes or gradients in JavaScript—need an RGB triplet rather than a hex string, since it's easier to do math on three separate numbers than on a packed hex value.
What hex color code formats does this tool support?
  • 3-digit (#rgb) and 6-digit (#rrggbb) hex color codes, with or without the leading hash.
  • This tool does not currently handle 8-digit hex (#rrggbbaa) with an alpha channel—use the Hex to RGBA Converter for that.
  • All conversion happens instantly and locally in your browser; nothing leaves your device.
Are the results precise?
  • Yes. Each hex byte maps cleanly to its respective 0–255 integer, so RGB output is always exact—there's no rounding involved in a hex-to-RGB conversion.
Is this hex to RGB converter really free?
  • Yes—this tool is free for unlimited use, with results generated instantly and no account or signup required.

Understanding Hex to RGB Conversion: Formula and Step-by-Step Guide

Hex to RGB – the Underlying Formula

How do you convert a hex color code to RGB, step by step?
  1. Identify the format: For #RRGGBB, split into three pairs: RR, GG, BB. For #RGB, double each digit first (e.g. #39f becomes #3399ff).
  2. Convert each pair to decimal: Use the formula: $$V = 16^1 \times d_1 + 16^0 \times d_2$$ where \(d_1\) is the first hex digit of the pair, \(d_2\) is the second.
  3. Assemble the RGB value: rgb(R, G, B)

Sample Calculations

  • Example 1: Convert #FF0000 (red)
    FF (hex) → 255 (decimal); 00 → 0. So rgb(255, 0, 0) (red channel at maximum).
  • Example 2: Convert #FFD700 (gold): FF=255, D7=215, 00=0 → rgb(255, 215, 0)
  • Example 3: #394DFE → 39=57 (red), 4D=77 (green), FE=254 (blue) → rgb(57, 77, 254)

This process lets you take any #rrggbb or #rgb hex color code and translate it into rgb(r, g, b) format for any context—stylesheet code, canvas drawing, or image-processing scripts—so every color in your project renders exactly as intended. Just type the hex code above and read the decimal RGB values instantly. Enter a code in the Hex Color field of the hex to hsv converter and the HSV Output box shows the full breakdown.