RGB to HEX Converter
Convert RGB, HSL and HEX colour values in both directions.
RGB to HEX Converter
HEX
3 or 6 digits, with or without #.
RGB
rgb(79, 70, 229)
HSL
hsl(243, 75%, 59%)
HSL values are rounded to whole numbers; HEX and RGB are exact. Opaque colours only.
Colour conversion in one view
The HitBidder RGB to HEX Converter shows the same colour as HEX, RGB and HSL at once. Change any value and the other representations update immediately, so you can move a palette between design tools and CSS without a round trip through a calculator.
How to use it
- Pick a colour with the colour picker, or type a HEX, RGB or HSL value.
- Watch the preview and the other two representations update.
- Copy
#RRGGBB,rgb(r, g, b)orhsl(h, s%, l%)with the card buttons.
HEX accepts three- or six-digit values with or without a leading #. Incomplete input is left
alone until it becomes a valid colour, so typing does not jump the values around.
HEX vs RGB vs HSL
- HEX is a compact hexadecimal representation of the red, green and blue channels (00–FF).
- RGB expresses the same channels as integers from 0 to 255.
- HSL describes hue (0–360°), saturation and lightness as percentages. It is easier for adjusting a palette by eye.
Rounding and exactness
HEX and RGB map exactly to each other. HSL values are rounded to whole numbers so they are readable, which means a HEX → HSL → HEX round trip can shift a channel by a unit or two. Treat the HEX value as authoritative when exact brand colours matter.
Opaque colours only
This tool does not handle alpha or transparency. If you need semi-transparent colours, convert the opaque
colour here and add alpha in your CSS with rgba() or hsla().
Colour converter FAQ
Tools get you ready. Real traffic gets you results.
HitBidder is a free 1:1 traffic exchange. Give a click, get a click, and send real visitors to the pages you just finished optimising.