Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
page
Hex to RGB converter icon showing overlapping circles

HEX to RGB Converter

HEX to RGB Converter

Convert HEX color codes to RGB (and back)

Saved Colors
No history yet. Convert a color below to start tracking.

HEX colors are written as a 6-digit (or 3-digit shorthand) base-16 code like #FF5733, where each pair of digits represents the Red, Green and Blue channel from 00-FF (0-255). They are the standard way to specify colors in CSS, HTML and design tools.

RGB expresses the same color as three decimal numbers from 0-255, e.g. rgb(255, 87, 51). RGB is common in image editors, canvas/graphics code and some CSS functions like rgb() and rgba().

Use this tool to move freely between the two formats when styling web pages, building design systems, or matching brand colors.

HEX Code
RGB Values
🎨 Your Color
Current Color
#FF5733
rgb(255, 87, 51)
Quick Reference

CSS, design tools, and graphics code each favor a different color notation, this converter switches between HEX and RGB instantly, with a visual color picker for when you’re starting from a color rather than a code.

How to use this HEX to RGB converter

  1. Enter a HEX code (like #FF5733) in the HEX Code field, or use the color picker to select visually.
  2. Read the equivalent RGB value instantly.
  3. Save colors to history for quick reuse across a project.

What this converter does

HEX colors are written as a 6-digit (or 3-digit shorthand) base-16 code like #FF5733, where each pair of digits represents the Red, Green, and Blue channel from 00 to FF (0 to 255 in decimal). They’re the standard way to specify colors in CSS, HTML, and design tools.

RGB expresses the same color as three decimal numbers from 0 to 255, for example rgb(255, 87, 51). RGB is common in image editors, canvas/graphics code, and CSS functions like rgb() and rgba().

HEX #RRGGBB → RGB: each pair converted from base-16 to base-10 (0-255)

Why both formats matter in practice

Design tools and CSS stylesheets typically use HEX for brevity, while graphics libraries, canvas APIs, and some CSS functions expect RGB’s explicit three-number format. Moving between the two is a routine need when styling web pages, building a design system, or matching a brand color specified in one format to code that requires the other.

Frequently asked questions

How do I convert a HEX color to RGB?

Split the 6-digit HEX code into three pairs (Red, Green, Blue), and convert each base-16 pair into its base-10 decimal value from 0-255, for example #FF5733 becomes rgb(255, 87, 51).

Why do web developers use both HEX and RGB?

HEX is more compact and common in CSS and design tools, while RGB’s explicit three-number format is often required by graphics libraries, canvas APIs, and specific CSS functions like rgba() that need separate control over each channel.