HomeConvertersColorHex to RGB Color Conversion
Color conversion

Hex to RGB Color Conversion

Hex to RGB Color Conversion. Exact conversion factors, worked examples, and privacy-first browser calculation on CalculatorX. Runs locally in your browser.

Instant result
Result

Enter values to convert.

Inputs
Mode
Formula

Formulas

Core equations used by this converter.

RedR = parseInt(RR, 16)
GreenG = parseInt(GG, 16)
BlueB = parseInt(BB, 16)
isRGB-style 8-bit channels (0–255) unless noted. Calculation runs locally in your browser.

How to use

1

Choose HEX → RGB or RGB → HEX

Use the tabs in the converter to switch direction.

2

Enter hex or RGB values

Fill in the active fields for the selected direction.

3

Convert and read the result

Use Convert or let the result update automatically.

Example conversions

Common values with formula and result.

ϟ

#FF0000 → RGB

#FF0000 → RGB

R = FF₁₆ = 255
rgb(255, 0, 0) (red)
ϟ

#FFD700 → RGB (gold)

#FFD700 → RGB (gold)

R = FF₁₆ = 255
rgb(255, 215, 0)
ϟ

#008080 → RGB (teal)

#008080 → RGB (teal)

R = 00₁₆ = 0
rgb(0, 128, 128)

Hex to RGB Color Conversion specification

Version 1.1.0 · Engine tested

Calculation status
  • Engine tested 3 published cases
  • Named expert review Not performed
  • Calculation version 1.1.0

Review policy

Definition
**HEX** — a 6-digit hexadecimal color code `#RRGGBB` (base 16). Each channel uses two digits (`00`–`FF`). **RGB** — red, green, and blue intensity, each an integer from **0 to 255**.
What it calculates
Convert HEX #RRGGBB to RGB (0–255). Pair hex digits to R, G, B; worked examples, color chart, and FAQ.
Inputs
  • Values required by the selected conversion mode
Outputs
  • Converted result in the target unit or format
Formula
R = parseInt(RR, 16) · G = parseInt(GG, 16) · B = parseInt(BB, 16)
Hex to RGB color table
Color nameHexRGB (R, G, B)
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)
Assumptions
  • Conversion runs locally in the browser; values are not uploaded.
  • Uses the formulas documented on this page.
Units
  • Red
  • Green
  • Blue
Boundary conditions
  • Empty or invalid input yields no valid result.
  • Out-of-range values may be rejected by the tool runtime.
Example
#FF0000 → RGB → rgb(255, 0, 0) (red)
Validation cases
  • #FF0000 → RGB → rgb(255, 0, 0) (red)
  • #FFD700 → RGB (gold) → rgb(255, 215, 0)
  • #008080 → RGB (teal) → rgb(0, 128, 128)
Sources
  • CalculatorX converter runtime
  • Standard unit / encoding definitions where applicable
Calculation version
1.1.0

Background

Interpretation and common distinctions.

Use the converter tabs to switch direction when available. Results for Hex to RGB Color Conversion update locally in your browser.

Frequently asked questions

Key distinctions behind the conversion.

How do you convert using Hex to RGB Color Conversion?

Use R = parseInt(RR, 16). Example: #FF0000 → RGB → rgb(255, 0, 0) (red).

Can I switch direction?

Open the related reverse converter listed under Related tools.

Does this run online or locally?

Calculation runs locally in your browser. Values are not uploaded.

How precise are the results?

Results follow the formulas on this page. Round to the precision your use case needs.