RGB to HEX Converter

Convert red, green and blue channel values into CSS-friendly HEX color output.

Result

#0F766E

RGB to HEX conversion runs locally in your browser.

All conversion happens locally in your browser. The value you enter is not sent to a server, logged, stored, or transmitted.

How to use this tool

Enter the required values in the labeled fields. Results update in your browser and are announced for assistive technologies. Use realistic measurements and verify important outcomes before acting on them.

Formula or logic

Each RGB channel is validated from 0 to 255. Optional alpha from 0 to 1 can produce 8-digit HEX.

Example calculation

Example: RGB 15, 118, 110 becomes #0F766E.

Frequently asked questions

What range is valid for RGB?

Each RGB channel must be between 0 and 255.

Can alpha be included?

Yes. Alpha from 0 to 1 can be included.

Related tools

Converters

Color Converter

Convert HEX colors to RGB, RGBA, HSL and HSLA formats locally.

Design Tools

Contrast Checker

Check foreground and background colors against WCAG contrast rules.