Skip to content
KitWren
Website

RGB to HEX Converter

Convert RGB colour values to a HEX code for CSS and design tools.

  1. Paste your input
  2. Choose the options
  3. Copy the output
Runs in your browser. Your data and files never leave your device.

About the RGB to HEX Converter

Enter rgb(…) or just three numbers like 59, 91, 219 to get the HEX code.

RGB to HEX Converter formula

hex = # + R.toString(16) + G.toString(16) + B.toString(16)

Frequently asked questions

Is HEX or RGB better for CSS?

They’re equivalent. HEX is shorter; rgb() and modern colour functions are easier when you want to adjust channels or add transparency.