HEX to RGB Color Converter
Convert HEX color codes to RGB, HSL, and CSS values instantly. Also convert RGB back to HEX.
How to Convert HEX to RGB
A HEX color code is a 6-digit hexadecimal number representing a color, written as #RRGGBB. To convert to RGB, split the code into three 2-digit pairs and convert each from base-16 to base-10. For example, #FF5733 splits into FF (red), 57 (green), 33 (blue). In decimal: FF=255, 57=87, 33=51. Result: rgb(255, 87, 51). This tool does the conversion automatically — just type or paste any HEX code.
HEX vs RGB — What Is the Difference?
HEX and RGB represent the same colours using different notation. RGB lists three decimal numbers (0-255) for red, green, and blue. HEX encodes those same three numbers in base-16 notation as a 6-character string prefixed with #. Both are equally valid in CSS — color: rgb(255, 99, 71) and color: #FF6347 render identically. HEX is more compact for typing; RGB is more readable for understanding the colour values.
Common HEX Color Codes
#FFFFFF = white | #000000 = black | #FF0000 = pure red | #00FF00 = pure green | #0000FF = pure blue | #FFFF00 = yellow | #FF6347 = tomato red | #40E0D0 = turquoise | #FFD700 = gold. The first two characters represent red intensity (00=none, FF=max), the middle two represent green, and the last two represent blue.