A hex to RGB converter is a small utility that turns a hex color code (`#FF5733`) into the three integer channel values it represents (`rgb(255 87 51)`). Hex and RGB are the two formats every web stylesheet, design tool, and image-pixel pipeline has been built around since the late 1990s, and the conversion between them is the single most common operation in color tooling. Hex is the terse copy-paste format that Figma, Sketch, Photoshop, and every brand-guidelines PDF export by default — a 6-character base-16 string that fits in a CSS custom property comfortably and reads at a glance once your eyes learn the patterns. RGB is the channel-addressed format that hardware APIs, canvas drawing calls, image-buffer manipulation, OpenGL color attributes, and most graphics SDKs expect — three separate 0-255 integers (or 0-1 normalized floats) that map directly to the red, green, and blue subpixels of an LCD or the phosphors of a CRT. Converting between them is mechanical: split the hex into three 2-digit pairs and read each pair as a base-16 number. This tool runs that conversion live as you type, with no "Convert" button to click, and surfaces every other common color format (HSL, OKLCH, OKLAB, HSV, HWB, CMYK, plus the 148 CSS named colors) alongside the RGB output for free.
**The RGB format itself deserves a closer look.** Standard 24-bit sRGB encodes each channel as an 8-bit unsigned integer from 0 to 255 — 256 values per channel, 16,777,216 colors total (256³). The reference standard is IEC 61966-2-1, the 1996 sRGB specification anchored to the CRT phosphor primaries that dominated displays at the time. CSS exposes RGB through the `rgb()` function in three syntactic flavors. The original CSS 1 form uses comma separators: `rgb(255, 87, 51)`. CSS Color 4 (W3C Candidate Recommendation since 2022) added a modern space-separated form: `rgb(255 87 51)`, with an optional alpha channel after a slash: `rgb(255 87 51 / 0.5)`. Both forms are interchangeable and ship in every evergreen browser. RGB also accepts percentage channels: `rgb(100% 33% 20%)` is equivalent to `rgb(255 87 51)`, sometimes preferred in hand-written stylesheets for readability. Alpha specifically has a separate `rgba()` function for legacy support — `rgba(255, 87, 51, 0.5)` is the canonical form that works everywhere down to IE 9. CSS Color 4 also added a `color(srgb 1 0.341 0.2)` syntax for explicit sRGB addressing, and parallel `color(display-p3 ...)` and `color(rec2020 ...)` functions for wide-gamut values that hex can't encode.
The conversion math goes both directions cleanly. **HEX to RGB**: parse the 6-digit hex `#RRGGBB` as three 2-digit base-16 numbers via `parseInt(hex.slice(1, 3), 16)`, `parseInt(hex.slice(3, 5), 16)`, `parseInt(hex.slice(5, 7), 16)`. For 3-digit shorthand `#RGB`, expand each digit by duplicating it (`#F73` → `#FF7733`) before parsing — this is *not* a left-pad. For 8-digit alpha `#RRGGBBAA`, parse the trailing pair the same way and divide by 255 to get the 0-1 alpha float. For 4-digit alpha shorthand `#RGBA`, expand each digit first (`#F738` → `#FF773388`). **RGB to HEX** is the inverse: for each channel, call `value.toString(16).padStart(2, '0')` to get the 2-digit hex pair (the `padStart` matters — without it, channel value 5 would serialize as `'5'` instead of `'05'`, producing invalid hex), then concatenate. Both directions are bit-exact in either direction: 16² = 256, exactly matching the 0-255 byte range each channel occupies, so a HEX → RGB → HEX round-trip produces the original input verbatim with no float drift.
**Why hex versus RGB?** Hex is shorter, design-tool-native, and the format your eye learns over time — most front-end developers can identify `#3b82f6` as Tailwind blue-500 at a glance. RGB is explicit-channel-addressing, easier to compute against in JavaScript, and the only of the two that accepts alpha and percentages cleanly. The two formats coexist because they solve different problems. Web stylesheets and brand guidelines lean hex because copy-paste cost dominates. Canvas drawing calls, image processing, hardware-LED APIs, and any code that does per-channel arithmetic lean RGB because indexing into a tuple beats slicing a string. The shift between them happens dozens of times in a typical web project — paste a hex from Figma, convert to RGB integers for a `ctx.fillStyle = ...` call, convert back to hex for a CSS variable definition.
This tool's HEX → RGB workflow is one direction of a 5-spoke family that all share the same underlying unified color converter. The dedicated unified color converter is the hub — it shows all 9 formats simultaneously editable and is the right tool when your workflow needs more than just hex and RGB. The single-direction spokes target specific Google search intents: the reverse RGB to hex converter for the inverse direction, the hex to HSL converter for the legacy designer-cognitive space, the hex to OKLCH converter for modern perceptually-uniform design systems (Tailwind v4 and shadcn both default to OKLCH now), and the hex to CMYK converter for print-prep approximations. All five spokes and the hub share the same parsing engine and the same conversion math, so the results are guaranteed identical across the family. Every conversion runs locally in your browser — your hex codes are never uploaded, never logged, and zero network requests fire as you type. Verify in DevTools.