TR

Home / Convert / HEX ↔ RGB Converter

🎨 HEX ↔ RGB Converter

Convert a color code between HEX and RGB.

WhatsAppTelegramX

Not an official institution.

Last updated: November 2026 · Parameter year: 2026 · Methods and sources: Methodology · Editorial policy

What is HEX ↔ RGB Converter?

In web design, colors are usually expressed as HEX (#1A2B3C) or RGB (26, 43, 60). Both define the intensity of the red, green, and blue channels in the range 0–255; HEX writes these three numbers in hexadecimal.

With this tool you can convert a color code from HEX to RGB or from RGB to HEX. For example, #0B7A6B is 11, 122, 107 in RGB. For RGB input, write the numbers separated by commas.

It makes your work easier when writing CSS, matching colors in graphic design programs, or transferring brand colors between formats.

How to use

Fill in these fields: Color, Direction. Then press the button; the result appears on the same page and your data never leaves your device.

Formula

Each channel is a 2-digit hexadecimal number

Example

#0B7A6B = rgb(11, 122, 107)

Worked examples and tips

Example 1: The orange color of a campaign poster is #FF5733. When you choose HEX → RGB and enter it, the result is rgb(255, 87, 51). You can transfer these values directly to CSS or a design program.

Example 2: For a forest-like green in an image, if you enter the value 34,139,34 in the RGB → HEX direction, you get #228B22. It gives you a ready code to use in web page styling.

Example 3: #1A2B3C, a navy tone, gives rgb(26, 43, 60) as its RGB equivalent. Writing the same color in two formats is useful for staying consistent across different tools.

Tips and common mistakes: The hash sign at the start of a HEX code is generally required; if you write something other than 6 digits, that is, three channel pairs, the result may give an error. Separate RGB values with commas and keep each channel between 0 and 255. Three-digit short codes, for example #F80, are valid in some systems, but writing the full six digits is safe here. When converting colors for print, remember that screen colors and CMYK will differ. When choosing text and background colors, also look at the contrast ratio; white text on light gray is unreadable.

When to use it? It is a practical helper when moving a logo's or website's color code between a design program and CSS, converting a value you picked from an image into another format, and adapting the colors in a brand guide to different media.

Frequently asked questions

Short HEX?

3-digit codes such as #0FA are supported.

Related guide

Related tools

📏Kilometers ↔ Miles ConverterConvert kilometers to miles and miles to kilometers.🌡️Celsius ↔ Fahrenheit ConverterConvert temperature between Celsius and Fahrenheit.🐎kW ↔ HP ConverterConvert engine power between kW and horsepower (PS).⚖️Weight ConverterWeight Converter – get instant, free results right on your device.📏Length ConverterLength Converter – get instant, free results right on your device.🏎️Speed ConverterSpeed Converter – get instant, free results right on your device.