RGB → HEX Converter

Select Conversion Type

How to convert RGB to HEX

How the conversion works

A HEX color is the three RGB numbers written in base 16, two digits each. Convert each channel to hexadecimal and join them after a # sign.

Example: rgb(255, 87, 51). 255 is FF, 87 is 57 and 51 is 33, so the HEX code is #FF5733.

Tips

Frequently Asked Questions

Is the HEX code case sensitive?

No. #ff5733 and #FF5733 are the same color.

What is the HEX code for rgb(0, 0, 0)?

#000000, which is black. White, rgb(255, 255, 255), is #FFFFFF.

Can I convert decimals like 127.5?

Use whole numbers. Decimal values are rounded.

More Color Converters