Skip to content
ToolHub

HEX to RGB Converter

Convert a HEX colour code such as #5B8DEF or #FFF to rgb().

๐ŸŽจ
ColorTools Pro
Color Tools & Generators
โœจ Result
โ€”
โ€”
History 0
๐ŸŽจ
No colors yet
Your history will appear here

About the HEX to RGB Converter

The HEX to RGB Converter turns a hexadecimal colour code into its red, green and blue values from 0 to 255, written as CSS rgb(). It accepts 6-digit codes like #5B8DEF and 3-digit shorthand like #FFF, with or without the #.

How to use the HEX to RGB Converter

  1. Enter the HEX code.
  2. Copy the rgb() value.

Example

How it works

Each pair of hex digits is one channel: 5B = 91, 8D = 141, EF = 239, so #5B8DEF = rgb(91, 141, 239).

Frequently asked questions

How does 3-digit shorthand work?

Each digit is doubled: #F80 means #FF8800.

What about 8-digit hex with transparency?

The last two digits are alpha. Use rgba() if you need the transparency in CSS.

Is HEX case-sensitive?

No. #5b8def and #5B8DEF are the same colour.

Use โ†‘ โ†“ to move, Enter to open.