Hex to RGB Converter: Convert Colors in a Snap!

How the Parsing Works

Enter a hex color with or without the leading "#" — both FF6600 and #FF6600 work. The tool splits the six hex digits into three pairs and converts each pair from base 16 to base 10. #FF6600 becomes rgb(255, 102, 0), a solid orange.

Shorthand Hex Codes

Three-digit shorthand is supported too: #F60 is expanded to #FF6600 before conversion (each digit is doubled), producing the identical rgb(255, 102, 0) result. Anything that isn't exactly 3 or 6 valid hex characters (0-9, A-F) is rejected with a format error.

The Color Preview

The result box's background is set to your entered color, and the text switches between black and white automatically based on whether the combined R+G+B total is above or below 382 — a simple brightness threshold that keeps the rgb text readable against both light and dark colors.