Skip to content

Convert RGB color to hex

Enter rgb() / rgba() or comma-separated channels. Get a #RRGGBB or #RRGGBBAA hex code with a live color preview—handy for CSS and design handoff.

Use the swatch to pick a color. RGB also accepts Chinese commas (,).

100%

Preview

ChannelsClick to copy

Need hex → RGB instead?

Private · Fast · Free

Examples

Click a row to fill the input and convert

InputOutput

RGB from props or legacy CSS often needs Hex for other tools. Multiple input styles are accepted with a live swatch.

How to convert RGB to Hex

  1. Enter rgb()/rgba() or comma-separated channels
  2. Non-opaque alpha yields 8-digit #RRGGBBAA
  3. Copy the Hex and confirm against the preview

Good for

  • rgb() → #RRGGBB / #RRGGBBAA
  • Flexible separators
  • Fast local color checks

Common uses

  • Push CSS rgb back into Hex palettes
  • Export 8-digit Hex for mobile UI
  • Cross-check with Hex to RGB

Tips

FAQ

What RGB formats are accepted?
rgb(255, 87, 51), rgba(...), or plain 255, 87, 51. Alpha can be 0–1 or 0–255.
When do I get an 8-digit hex?
When alpha is present and not fully opaque, the output uses #RRGGBBAA.

Related tools