RGB to Hex Converter

Convert RGB color format to HEX format.

Frequently Asked Questions

Convert each R, G, B value (0-255) to its two-digit hexadecimal equivalent and concatenate them. For example, RGB(255, 87, 51) becomes #FF5733.

Each R, G, B component must be between 0 and 255. Values outside this range are invalid.

Yes. The output is in the format #RRGGBB which is valid CSS syntax for color properties.

Yes. Add the HEX colour to your tailwind.config.js under theme.extend.colors to use it as a custom colour class.

Red: #FF0000, Green: #00FF00, Blue: #0000FF, White: #FFFFFF, Black: #000000, Yellow: #FFFF00, Cyan: #00FFFF, Magenta: #FF00FF.

Standard HEX (#RRGGBB) does not include alpha. Use 8-digit HEX (#RRGGBBAA) for colours with transparency.

Use browser DevTools: right-click an element, inspect it, and click the colour swatch in the Styles panel to see and convert the colour value.