Color Tools

HEX to RGB Converter

Convert HEX color codes to RGB or RGBA values instantly. Preview colors with contrast analysis, synchronize with a native color picker, inspect individual channel breakdowns, and copy CSS formats for web design.

#006D77 rgb(0, 109, 119)
Light Text Active

Enter HEX Color Code

Enter a 3, 6, 4, or 8-digit hexadecimal color code. The leading hash (#) is optional.

#
Valid
Valid 6-digit standard HEX color code.
Alpha Opacity (Transparency): 1.00 (100%)
Standard Color Palette:
Web & Modern Palette:

RGB Channels & Code Formats

Red (R)
0
HEX: 00 0%
Green (G)
109
HEX: 6D 43%
Blue (B)
119
HEX: 77 47%
CSS RGB Code rgb(0, 109, 119)
CSS RGBA Code (with Opacity) rgba(0, 109, 119, 1.0)
Raw Channel Values (R, G, B) 0, 109, 119
Normalized Standard HEX #006D77
CSS HSL Format hsl(185, 100%, 23%)
Print CMYK Format cmyk(100%, 8%, 0%, 53%)
Detected Name
Deep Teal
Luminance
0.126
vs White Text
6.8:1 (AAA)
vs Black Text
3.1:1 (Fail)

Tints & Shades Palette (Click to Select)

Derived shades (darkened with black) and tints (lightened with white) for the active color. Click any swatch to load it directly.

RGB Channel Inputs

Adjust Red, Green, and Blue sliders or enter integer values from 0 to 255 to calculate the exact HEX color code in real time.

Red Channel (0 - 255)
Green Channel (0 - 255)
Blue Channel (0 - 255)
Alpha Opacity (0 - 100%)

Calculated HEX Color Output

Calculated 6-Digit HEX #006D77
8-Digit HEX (with Alpha) #006D77FF
CSS RGB Code rgb(0, 109, 119)
CSS RGBA Code rgba(0, 109, 119, 1)
How Reverse Conversion Works:

Each decimal value from 0 to 255 is converted into a 2-digit base-16 hexadecimal number (0 = 00, 255 = FF) and concatenated into a single string prefixed with #.

How HEX to RGB Mathematical Conversion Works

A hexadecimal color code uses a base-16 numbering system (digits 0–9 and letters A–F) to represent the intensity of red, green, and blue light channels on digital screens.

1. Two-Digit Hex Mapping

In a 6-digit hex code #RRGGBB, each pair of characters represents one color channel from 00 (0) to FF (255).

Channel = (D1 × 16) + D2
Example: #6D → (6 × 16) + 13 = 109
2. Three-Digit Shorthand

In 3-digit shorthand #RGB, each digit duplicates itself to create the full 6-digit form before conversion.

#39C → #3399CC
Red: #33 = 51, Green: #99 = 153, Blue: #CC = 204
3. Eight-Digit Hex Alpha

In 8-digit notation #RRGGBBAA, the 4th pair represents alpha transparency normalized between 0.00 and 1.00.

Alpha = (Hex Byte) ÷ 255
Example: #80 → 128 ÷ 255 ≈ 0.50 (50% opacity)

Quick Reference: Popular HEX to RGB Color Codes

Color Color Name HEX Code Red (R) Green (G) Blue (B) CSS RGB Syntax
Pure White #FFFFFF 255 255 255 rgb(255, 255, 255)
Pure Black #000000 0 0 0 rgb(0, 0, 0)
PaceTools Teal #006D77 0 109 119 rgb(0, 109, 119)
Pure Red #FF0000 255 0 0 rgb(255, 0, 0)
Lime Green #00FF00 0 255 0 rgb(0, 255, 0)
Pure Blue #0000FF 0 0 255 rgb(0, 0, 255)
Vibrant Orange #FF5733 255 87 51 rgb(255, 87, 51)
Coral Accent #E29578 226 149 120 rgb(226, 149, 120)
Shorthand #ABC #ABC (#AABBCC) 170 187 204 rgb(170, 187, 204)

Frequently Asked Questions

HEX (hexadecimal) and RGB (red, green, blue) represent the exact same colors using two different numbering systems. RGB expresses light intensities as three decimal integers from 0 to 255 (e.g. rgb(0, 109, 119)). HEX expresses the same three light channels as base-16 hexadecimal numbers from 00 to FF preceded by a hash (#006D77). Both formats are natively supported across CSS, HTML, SVG, and design applications.

According to the W3C CSS specification, 3-digit shorthand hex codes (#RGB) expand by duplicating each individual digit into a double character. For example, #ABC becomes #AABBCC (Red 170, Green 187, Blue 204), and #F00 becomes #FF0000 (Red 255, Green 0, Blue 0). It never appends trailing zeros.

Yes. When an 8-digit HEX code (#RRGGBBAA) or 4-digit shorthand (#RGBA) is entered, the 4th channel pair is extracted as the alpha transparency byte. It is converted from 0–255 into a normalized float between 0.00 and 1.00, generating the corresponding CSS rgba() syntax.

Digital color displays use 8 bits (1 byte) of memory for each red, green, and blue subpixel in 24-bit True Color systems. An 8-bit binary number can represent 2^8 = 256 unique discrete levels (0 to 255). Combining 256 red x 256 green x 256 blue levels yields 16,777,216 distinct colors.

Yes! Switch to the "RGB to HEX (Reverse Mode)" tab at the top of the tool. You can adjust interactive sliders or type exact integer channel values from 0 to 255 to calculate the matching 6-digit or 8-digit HEX color code in real time.

Yes. All mathematical color conversions, preview rendering, and channel parsing run 100% locally in your web browser using JavaScript. No color codes or user data are ever transmitted to any external server.
Copied to clipboard!