Web Tools 7 min read

Hex to RGB Color Converter & Web Developer Guide

Learn how Hexadecimal color codes (#RRGGBB) convert to RGB (Red, Green, Blue) integer values. Includes CSS color styling formulas and reference lists.

Table of Contents

Understanding Hexadecimal Color Codes

A Hex color code is a 6-digit hexadecimal number used in web design (HTML/CSS) to represent Red, Green, and Blue color intensities from 00 (0) to FF (255).

Conversion Formula Breakdown

Format: #RRGGBB → Convert each 2-digit hex pair from base-16 to base-10.

  • Hex RR: (First digit × 16) + (Second digit) → Red value (0-255)
  • Hex GG: (First digit × 16) + (Second digit) → Green value (0-255)
  • Hex BB: (First digit × 16) + (Second digit) → Blue value (0-255)

Example: #3B82F6 → R: 3×16+11=59 | G: 8×16+2=130 | B: 15×16+6=246 → rgb(59, 130, 246).

Σ
Reviewed by Applied Math Specialists • Editorial Policy
Updated: August 11, 2026

Related Interactive Calculators

Practice Tools