MewTools

ColorTool 02

RGB to HEX

Take the channel numbers from a spec or a stylesheet and get a compact hex code that works everywhere.

Runs locallyNo uploadRGB colourFree, no account

Convert colour

27 / 232

Result

Waiting

Run the tool and the result appears here. Copy it or download it — nothing leaves this tab.

Privacy

Local by design

Everything you type stays in this tab and is processed by JavaScript on your device. Nothing is uploaded, logged or stored on a server.

How to use it

01

Paste a CSS rgb() or rgba() value, or type three channel numbers.

02

The hex code and HSL values appear instantly alongside a colour swatch.

03

Copy the hex value for a design token or a stylesheet.

When to use it

Token cleanup

Normalise colours from a spec into one hex format.

Figma to code

Convert a displayed RGB readout into a hex value.

Email design

Use hex where an email client ignores modern colour syntax.

Questions

Can I enter rgba()?

Yes. The alpha channel is ignored in the hex output, which is six digits.

Are percentages accepted?

Use whole numbers from 0 to 255. Percentage channel values are not parsed.

Why does the hex look different from my memory?

Check each channel. A single swapped digit changes the colour noticeably.

How do I convert RGB values to a hex code?

Enter three channel numbers or paste an rgb() value. Each channel becomes a two-digit hex pair, so rgb(11, 87, 240) becomes #0b57f0, which is the form most stylesheets and design tokens expect.

What happens to the alpha channel in rgba()?

The colour converts to six-digit hex and the transparency is reported separately, because classic hex has no alpha. Use the eight-digit form or hsla() in CSS when the transparency must survive.

↑↓ to move↵ to openEsc to close