RGB ↔ Hex Converter

Convert between RGB and HEX color codes

RGB ↔ Hex Converter — free online tool

🔒 On-device · Method · · Disclaimer · RGB ↔ Hex Converter

Need to convert between RGB and HEX color codes? RGB ↔ Hex Converter answers in seconds. You supply Red (0-255), Green (0-255) and Blue (0-255) to RGB ↔ Hex; the answer follows at once. RGB ↔ Hex puts the headline number first. Students and professionals reach for RGB ↔ Hex when speed matters. Nothing is uploaded while RGB ↔ Hex works, and the figures stay put. Looking for rgb to hex or free online rgb ↔ hex converter? RGB ↔ Hex covers both. RGB ↔ Hex is designed for real people. Labels stay plain. RGB ↔ Hex stays bookmarked for next time.

One colour, two notations

RGB 79, 70, 229 converts to #4F46E5. Each channel becomes two hexadecimal digits: 79 = 4F, 70 = 46, 229 = E5, joined in red-green-blue order behind a hash.

The two forms carry exactly the same information. Hex is simply the same three bytes written in base 16 instead of base 10, which is why every hex colour has six digits and every RGB value has three numbers between 0 and 255.

Why two digits per channel

A channel is one byte: 0 to 255, or 00 to FF in hexadecimal. Two hex digits hold exactly that range, so 256 × 256 × 256 gives the familiar 16,777,216 colours.

The conversion is positional: the first digit is worth 16 and the second worth 1. 4F = 4 × 16 + 15 = 79. E5 = 14 × 16 + 5 = 229.

Worked example, all three channels

Red 79 → 79 ÷ 16 = 4 remainder 15 → 4F (F is 15).
Green 70 → 70 ÷ 16 = 4 remainder 6 → 46.
Blue 229 → 229 ÷ 16 = 14 remainder 5 → E5 (E is 14).
Result: #4F46E5, a mid indigo.

Going the other way is the same arithmetic reversed: take #FFFFFF, split into FF FF FF, evaluate each as 255 255 255 — pure white. #000000 is 0 0 0.

Short hex and alpha

Three-digit hex such as #0AF is shorthand: each digit is doubled, giving #00AAFF. Eight-digit hex adds an alpha pair at the end, so #4F46E5FF is the same colour fully opaque, and #4F46E500 is fully transparent. The converter reads the six-digit form.

Practical detail worth knowing

Frequently Asked Questions

Why is RGB 79, 70, 229 written as #4F46E5?

Each channel is converted to base 16 as two digits: 79 = 4F, 70 = 46, 229 = E5. Concatenated in red-green-blue order with a leading hash, that is #4F46E5.

What is F in hexadecimal?

F is 15 — the digits run 0–9 then A–F. That is why two hex digits cover 0–255: FF = 15 × 16 + 15 = 255.

What does a three-digit hex code mean?

Shorthand where each digit is doubled. #0AF means #00AAFF. It only exists for codes whose pairs repeat, which is why #4F46E5 cannot be shortened.

What do the last two digits of an eight-digit hex code do?

They set alpha, from 00 (transparent) to FF (opaque). #4F46E580 is the indigo at 50% alpha; the six-digit form is always fully opaque.

Does a hex code look the same on every screen?

Not exactly. Hex implies sRGB, and displays vary in gamut, calibration and brightness, so the same code can appear different on a phone and a calibrated monitor even though the numbers are identical.

About CalcProMaster calculators

CalcProMaster is a free library of 1285 online calculators across 20 categories — finance, health, math, business, construction, engineering, conversion, education and more. Every calculator runs entirely in your browser: no sign-up, no paywall, and no data leaves your device.

What makes these calculators different is transparency. Each tool shows the exact formula it uses. It also shows a step-by-step breakdown of how your inputs become the result. That way you can check the math instead of trusting a black box. Every calculator page explains how to read the result. It also lists common mistakes, assumptions and limitations. An FAQ sits with every one, and the most-used tools add a worked example. Health and finance tools name the formula they follow. Calorie needs use Mifflin-St Jeor. Loans use standard amortization. Each page says plainly when an answer should be confirmed with a professional.

The guides library goes deeper on the calculations people search for most. It covers percentage and discount math, loan EMI and amortization, income-tax brackets, calorie and macro planning, and concrete volumes. Each guide gives the formula, worked examples and links to the matching calculator. The glossary defines the terminology in plain language. The public formula QA dashboard shows the verification status of every calculator's math.

Popular starting points: loan EMI calculator, BMI calculator, percentage calculator, random number generator, and concrete calculator. You can also browse a category above to find the tool you need.

↑ ↓ navigate↵ openesc close