RGB to HEX Converter

Instantly convert RGB color values back to HEX format

Safe conversion with no data sent to server

Conversions

HEX#3B82F6
RGBrgb(59, 130, 246)
HSLhsl(217, 91%, 60%)
CMYKcmyk(76%, 47%, 0%, 4%)
Tailwindblue-500
CSS Var--color: #3B82F6;

Why convert RGB to HEX?

While RGB is great for understanding color components and applying opacity, HEX codes are much shorter and often preferred in clean CSS configurations or when sharing colors in design tools like Figma or Sketch.

How to Convert RGB to HEX Manually

To convert an RGB color to HEX, you take each value (Red, Green, Blue) and convert it from decimal (base 10) to hexadecimal (base 16). For example, if red is 255, the hexadecimal representation is FF. Ensure you pad single digits with a zero.