Report a problem

DEVELOPER TOOL

HEX to RGB Color Converter

Convert a HEX color to RGB or RGB values to HEX and preview it.

HEX to RGB Color Converter

FREE ONLINE TOOL

Which tool fits your task?

Compare the purpose of these tools before choosing.

  • HEX to RGB Color Converter · You are here

    Convert a HEX color to RGB or RGB values to HEX and preview it.

  • HSL to HEX Converter →

    Convert hue, saturation and lightness to a six-digit HEX color. Preview the color and copy HEX or RGB.

  • Image Color Picker →

    Pick a pixel from an image and copy its HEX, RGB and HSL color locally.

WHEN IT HELPS

Common uses

  • Match a CSS color to an RGB design value.
  • Convert an RGB brand color to a HEX code.

IN PRACTICE

Example

Convert #3366CC to RGB(51, 102, 204).

GOOD TO KNOW

Does it handle alpha transparency?

No. This tool handles opaque six-digit HEX and RGB colors.

Only opaque colors are supported. Each RGB channel must be an integer from 0 to 255.

How to convert HEX to RGB

A six-digit HEX color contains three pairs: RR, GG and BB. Convert each pair from base 16 to a decimal integer between 0 and 255. For #3366CC, 33 becomes 51, 66 becomes 102 and CC becomes 204, giving rgb(51, 102, 204). Use the result in a CSS declaration or a design application.

RGB to HEX: channel order and limits

For the reverse conversion, enter red, green and blue as whole numbers from 0 to 255. Each number becomes a two-digit hexadecimal pair, including a leading zero where needed. RGB(0, 128, 255) becomes #0080FF. This converter handles opaque six-digit colors; it does not process an alpha transparency channel.

HEX and RGB equivalents

HEX and RGB equivalents
ColorHEXRGB
Black#000000rgb(0, 0, 0)
White#FFFFFFrgb(255, 255, 255)
Red#FF0000rgb(255, 0, 0)
Blue example#3366CCrgb(51, 102, 204)
Cyan-blue example#0080FFrgb(0, 128, 255)

Each HEX pair represents one RGB channel: red, green, then blue. RGB channels must be whole numbers from 0 to 255.

Frequently asked questions

Can I enter a three-digit HEX code?

This converter accepts six-digit HEX codes. Expand a shorthand code by repeating each digit: #F80 becomes #FF8800, which corresponds to rgb(255, 136, 0).

Does the tool calculate HSL or transparency?

No. It converts opaque six-digit HEX and RGB colors. HSL, eight-digit HEX and alpha-channel values are outside the supported inputs.

Continue your task