ToolsleAll tools →
Design Tools

Hex to rgb converter

Convert HEX color codes to RGB, RGBA, HSL, and HSV instantly. Also converts RGB back to HEX. Includes color name detection and color blindness preview.

FAQPage Schema
HEX to RGB Converter — Free Online Tool
InstantFreeNo signup
#

Preview

CSS name

No CSS name (closest: tomato)

Color blindness preview

Normal vision
Protanopia
Deuteranopia
Tritanopia

RGB / HSL / HSV output

RGB

rgb(255, 87, 51)

RGBA

rgba(255, 87, 51, 1)

HSL

hsl(10.6, 100%, 60%)

HSV / HSB

hsv(10.6, 80%, 100%)

Channels

R

Decimal: 255

Percent: 100%

Binary: 11111111

G

Decimal: 87

Percent: 34.1%

Binary: 01010111

B

Decimal: 51

Percent: 20%

Binary: 00110011

A

Decimal: 1

Percent: 100%

Binary:

Recent colors

No recent colors yet.

Bulk converter

Paste one hex code per line (with or without #).

HEX to RGB Converter — Convert Color Codes Instantly

Our free HEX to RGB converter instantly converts any hex color code to RGB, RGBA, HSL, and HSV values. Switch to RGB to HEX mode to build colors from sliders and get the hex code. Detect CSS color names, preview colors for different types of color blindness, and bulk convert multiple hex codes at once.

How to Convert HEX to RGB

HEX color codes use base-16 (hexadecimal) notation. Each pair of hex digits represents one color channel (red, green, blue) on a scale from 0 (00) to 255 (FF).

StepActionExample (#FF5733)
1Take the 6-digit hex code#FF5733
2Split into three pairsFF, 57, 33
3Convert each pair to decimalFF=255, 57=87, 33=51
4Write as RGBrgb(255, 87, 51)

How to Convert RGB to HEX

Converting RGB to HEX is the reverse process. Each decimal channel value (0-255) is converted to a two-digit hexadecimal number.

StepActionExample rgb(255, 87, 51)
1Take the three RGB values255, 87, 51
2Convert each to base-16FF, 57, 33
3Pad to 2 digits if neededFF, 57, 33
4Concatenate with # prefix#FF5733

Color Format Reference

FormatSyntaxExampleTransparencyUsed In
HEX 6-digit#RRGGBB#FF5733NoCSS, HTML, design tools
HEX 8-digit#RRGGBBAA#FF573380YesModern CSS
HEX 3-digit#RGB#F53NoCSS shorthand for repeating pairs
RGBrgb(R,G,B)rgb(255,87,51)NoCSS
RGBArgba(R,G,B,A)rgba(255,87,51,0.5)YesCSS
HSLhsl(H,S%,L%)hsl(11,100%,60%)NoCSS
HSLAhsla(H,S%,L%,A)hsla(11,100%,60%,0.5)YesCSS
HSV/HSBhsv(H,S%,V%)hsv(11,80%,100%)NoDesign tools (Photoshop, Figma)

Common HEX Color Codes

Color NameHEXRGBHSL
Red#FF0000rgb(255, 0, 0)hsl(0, 100%, 50%)
Green#008000rgb(0, 128, 0)hsl(120, 100%, 25%)
Blue#0000FFrgb(0, 0, 255)hsl(240, 100%, 50%)
White#FFFFFFrgb(255, 255, 255)hsl(0, 0%, 100%)
Black#000000rgb(0, 0, 0)hsl(0, 0%, 0%)
Yellow#FFFF00rgb(255, 255, 0)hsl(60, 100%, 50%)
Cyan#00FFFFrgb(0, 255, 255)hsl(180, 100%, 50%)
Magenta#FF00FFrgb(255, 0, 255)hsl(300, 100%, 50%)
Orange#FFA500rgb(255, 165, 0)hsl(39, 100%, 50%)
Purple#800080rgb(128, 0, 128)hsl(300, 100%, 25%)
Pink#FFC0CBrgb(255, 192, 203)hsl(350, 100%, 88%)
Gray#808080rgb(128, 128, 128)hsl(0, 0%, 50%)
Brown#A52A2Argb(165, 42, 42)hsl(0, 59%, 41%)
Lime#00FF00rgb(0, 255, 0)hsl(120, 100%, 50%)
Navy#000080rgb(0, 0, 128)hsl(240, 100%, 25%)
Teal#008080rgb(0, 128, 128)hsl(180, 100%, 25%)

Hexadecimal Number System

Understanding hexadecimal helps you read and write HEX color codes more intuitively. Hexadecimal is a base-16 number system that uses 16 symbols: the digits 0-9 and the letters A-F.

DecimalHexBinaryIn Color Context
00000000000No contribution (darkest)
161000010000Very small contribution
322000100000Small contribution
644001000000Quarter intensity
1288010000000Half intensity
192C011000000Three-quarter intensity
224E011100000High intensity
255FF11111111Full contribution (brightest)

Color Blindness and Accessibility

Approximately 8% of men and 0.5% of women have some form of color vision deficiency. When designing with color, it is important to verify that your color choices are distinguishable for users with color blindness. The color blindness preview in this tool simulates how your selected color appears under three common types:

TypeAffectsMissing ConePrevalence
ProtanopiaRed-blindL-cone (red)1% of men
DeuteranopiaGreen-blindM-cone (green)1% of men
TritanopiaBlue-blindS-cone (blue)0.01% of population
AchromatopsiaAll colorsAll conesVery rare — complete color blindness

Guides & resources

  • HEX to RGB Converter: Understanding Color Codes

    A HEX to RGB converter helps you convert color codes from hexadecimal (hex) format to Red, Green, Blue (RGB) values. Hex codes are six-digit color codes like #FFA500, and RGB values are three numbers (0-255) for red, green, and blue components. This tool is commonly used in web design to ensure colors match across different systems and platforms.

FAQ

Frequently Asked Questions

Convert HEX color codes to RGB, RGBA, HSL, and HSV instantly. Also converts RGB back to HEX. Includes color name detection and color blindness preview. Open the tool in your browser on Toolsle.com — free, fast, and no download required.

Embed this tool on your site

Free to use on any website. Copy the code below and paste it into your page. A small “Powered by Toolsle” credit appears inside the embed.

↗ Preview embed · Full tool page

<iframe src="https://www.toolsle.com/embed/hex-to-rgb" width="100%" height="480" style="border:0;max-width:100%;" loading="lazy" title="Hex to rgb converter — Toolsle"></iframe>