RGB to HEX converter online — how do I paste rgb(255, 87, 51) and get a #hex code for Figma, CSS, or Slack?

Clamp each channel to 0–255, convert each to two hex digits, and join with #. Example: rgb(52, 152, 219) → #3498DB. Our RGB to HEX tool formats uppercase hex like many design apps.

Detailed answer

Enter rgb(r, g, b) or three comma-separated numbers. The tool rounds to integers, applies the same packing as the main Color Picker, and shows intermediate steps in the calculator panel. Copy the final string into any tool that expects #RRGGBB.

Relationship context

RGB lists channel strengths directly; HEX is the same information in base 16—use whichever your workflow prefers.

Example sRGB codes (HEX · RGB · HSL)

HEXRGBHSL (rounded)
#3498DBrgb(52, 152, 219)hsl(204, 70%, 53%)
#E74C3Crgb(231, 76, 60)hsl(6, 78%, 57%)
#2ECC71rgb(46, 204, 113)hsl(145, 63%, 49%)
#FFFFFFrgb(255, 255, 255)hsl(0, 0%, 100%)

Illustrative sRGB examples; HSL matches integer rounding in the Color Picker UI.

More Color Picker tools

Open the main picker or a fixed input/output converter—same math as the hub, with copy-ready strings.