My Learning

Keep this for later

Sign in or create a free account to save it. You’ll return to this page afterward.

Sign inCreate an account

RGB to HEX

Convert three decimal RGB channels to a six-digit hex color.

Use rgb(255, 0, 128) or 255, 0, 128.

How to use this tool

Enter channels such as rgb(255, 0, 128) or 255, 0, 128.

Important to know

Convert three decimal RGB channels to a six-digit hex color.

Each channel must be an integer from 0 to 255; alpha values are not supported.

Formula and methodology

Convert each decimal channel into a two-digit hexadecimal value and join them after #.

Example

rgb(255, 0, 128) becomes #FF0080.

Frequently asked questions

Are values rounded?

No. Only whole-number channels are accepted.