RGB to HEX Converter Online — Convert rgb(r, g, b) to #HEX
Convert RGB and RGBA color values to 6-digit HEX codes (#000000) online. Live preview palette, CSS output, and error checking.
✓ Parses standard rgb(255, 255, 255) strings or comma-separated numbers
✓ Outputs uppercase or lowercase 6-digit hexadecimal color codes
✓ Live visual color swatch display
✓ Instantly copy hex values into HTML, CSS, Figma, or Photoshop
How It Works
- Enter red, green, and blue numbers (0-255) or paste rgb(59, 130, 246).
- Each channel is converted to a two-digit hexadecimal representation.
- Copy the prefixed #HEX string.
Frequently Asked Questions
How do you convert RGB to HEX manually?
Divide each 0-255 channel number by 16. The integer quotient is the first hex digit, and the remainder is the second hex digit.