What is HEX to RGB Converter?
A HEX to RGB converter turns web color codes like #3b82f6 into rgb() or rgba() values for CSS, Tailwind, and design tokens. ToolsMinify's free HEX to RGB Converter goes further than a plain swap: you also get a format kit (HSL + CMYK), a clickable tint→shade ramp, WCAG contrast cards on white and black, and a CSS custom-property token snippet with space-separated RGB channels. Convert both directions, pick colors visually, and copy what you need - all in the browser.
Convert HEX to RGB (and back) with HSL, CMYK, a tint-shade ramp, WCAG contrast cards, and a CSS token snippet - free online color code converter.
Try it now
Open the free HEX to RGB Converter and follow the steps below - no download required.
Why use HEX to RGB Converter?
- Convert HEX ↔ RGB with a live swatch and native color picker
- Format kit for HEX, RGB, HSL, and CMYK with one-click CSS copy
- Tint→shade ramp you can click or copy as a mini palette
- WCAG contrast cards (AA/AAA) for text on white and black
- CSS token snippet with --brand, --brand-rgb, and auto contrast
- 100% client-side - no signup, upload, or server logging
How to use HEX to RGB Converter - step by step
- Step 1: Paste a HEX color, use the color picker, or click a preset swatch.
- Step 2: Copy rgb()/rgba() CSS, or enter R/G/B (0-255) to generate HEX the other way.
- Step 3: Use the format kit for HSL and CMYK, and the tint→shade ramp to explore lighter or darker steps.
- Step 4: Check WCAG contrast cards, then copy the CSS token snippet into your theme.
The HEX to RGB Converter lives under Converter Tools. Open the tool page, enter your input in the main field, and results update instantly. Use the copy button to paste output into documents, code editors, or spreadsheets.
Common use cases
CSS and design tokens
Paste a brand HEX and copy rgb()/rgba() or the :root token snippet with space-separated RGB for modern opacity syntax.
UI accessibility checks
Use the contrast cards to see whether a brand color passes AA/AAA as text on light or dark backgrounds before shipping.
Quick palette exploration
Click tint or shade steps to try lighter and darker variants, then copy the ramp into a ticket or Figma notes.
Print and multi-format handoff
Grab approximate CMYK alongside HSL when a vendor or style guide asks for more than HEX/RGB.
Examples
- #FFFFFF to RGB: White: rgb(255, 255, 255).
- #3b82f6 to RGB: Tailwind blue-500: rgb(59, 130, 246) plus matching HSL/CMYK in the format kit.
- Short #0f0: Expands to #00ff00 → rgb(0, 255, 0).
- Contrast + tokens: Blue #3b82f6 on white fails normal AA; the token snippet still exports --brand-rgb for modern CSS.
Pro tips
- Short #rgb expands each digit (e.g. #0f0 → #00ff00). Prefer full six-digit HEX in production CSS for clarity.
- Use --brand-rgb with rgb(var(--brand-rgb) / 0.5) for opacity without maintaining a separate RGBA token.
- CMYK here is a screen approximation - always proof critical print jobs on press.
- If contrast fails on white, try a darker ramp step or use the auto --brand-contrast color for text overlays.
- Pair with CM to Inches or Pixels to Inches when a design spec mixes color tokens with layout measurements.
Frequently asked questions
How do I convert HEX to RGB?
Each pair of HEX digits is a base-16 channel from 00 (0) to FF (255). For example #1A2B3C → R=26, G=43, B=60, written as rgb(26, 43, 60). This tool does the conversion as you type.
What HEX formats are supported?
Short #rgb (e.g. #fff), full #rrggbb (e.g. #3b82f6), and 8-digit #rrggbbaa with alpha. The leading # is optional, and letters can be upper or lower case. You can also pick a color with the native picker.
Can I convert RGB to HEX?
Yes - enter R, G, and B values from 0 to 255 and the tool outputs a lowercase #rrggbb code. Out-of-range values are clamped.
Does this show HSL and CMYK too?
Yes. The format kit lists HEX, RGB, HSL, and CMYK with one-click CSS copy. CMYK is a screen approximation useful for print handoff - always proof on a press when color-critical.
What is the tint → shade ramp?
It mixes your color toward white (tints) and black (shades). Click any step to load that HEX, or copy the whole ramp for a quick palette.
What do the contrast cards mean?
They show the WCAG contrast ratio of your color as text on white and on black, with AA/AAA pass or fail for normal and large text. Useful before shipping UI colors.
What is the difference between rgb() and rgba()?
rgb() has red, green, and blue only. rgba() adds an alpha (opacity) channel from 0 (transparent) to 1 (opaque). When you paste an 8-digit HEX, the tool outputs rgba().
Related tools you might need
Explore other converter tools on ToolsMinify. Related utilities are linked on the HEX to RGB Converter page to help you complete your workflow without leaving the site.
Ready to start?
Use the HEX to RGB Converter for free - accurate, fast, and optimized for mobile.