Docomint

HEX to RGB Converter

Convert a hex color code like #ff5733 to its RGB red/green/blue values instantly.

🔒 Processed on your device

CSS accepts both hex (#ff5733) and rgb() syntax, but they're not interchangeable everywhere — canvas's fillStyle, some animation libraries, and older email-client CSS often expect rgb() specifically, or you need the individual channel numbers to feed into a formula. This does the base-16-to-base-10 conversion pair by pair so you don't have to do the hex math by hand.

Example: #ff5733 splits into the pairs ff/57/33, which convert to 255/87/51 in decimal — so rgb(255, 87, 51) is the exact same color, just in the format a <canvas> script or an older CSS renderer expects.

How it works

  1. Pick a color or type a hex code (3 or 6 digits)
  2. Each hex pair is parsed to a 0–255 channel value on your device
  3. Copy the rgb() string or individual R/G/B numbers

Frequently asked questions

What is a hex color code?

A 6-digit base-16 number representing red, green, and blue as three 2-digit pairs (e.g. #ff5733 is ff red, 57 green, 33 blue) — the most common way to write a color in CSS and design tools.

Why do RGB values only go up to 255?

Each channel is stored in one byte (8 bits), and 2⁸ − 1 = 255 is the largest value a byte can hold — that's also why hex pairs (2 hex digits = 8 bits) max out at ff, which equals 255 in decimal.

Is my color values uploaded anywhere?

No — HEX to RGB Converter runs entirely in your browser using JavaScript/WebAssembly. Your color values is never sent to a server.

Related tools