Free tools · toolsle.com
#

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

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

Frequently Asked Questions

What is #FFF in HEX?

#FFF is the 3-digit shorthand for #FFFFFF — pure white. In 3-digit hex, each digit is doubled: F becomes FF (255), so #FFF = rgb(255, 255, 255). 3-digit hex only works when each pair of digits is identical (e.g. #AABBCC can be written as #ABC).

How do I add transparency to a HEX color?

Use 8-digit hex (#RRGGBBAA) where the last two digits represent alpha (00 = transparent, FF = fully opaque). For example, #FF0000 is solid red, #FF000080 is 50% transparent red (80 in hex = 128 in decimal = 50% of 255). Alternatively, use rgba() in CSS.

What is the difference between HSL and HSV?

Both use Hue (0-360°) and Saturation (0-100%). The third component differs: HSL uses Lightness where 0% = black, 50% = the pure color, 100% = white. HSV uses Value (brightness) where 0% = black and 100% = the pure color. HSV is used in most visual color pickers (including Photoshop) because it feels more intuitive for selecting colors.

How many colors can HEX represent?

6-digit HEX (#RRGGBB) can represent 256 × 256 × 256 = 16,777,216 colors (approximately 16.7 million). 8-digit HEX (#RRGGBBAA) adds 256 transparency levels, giving 256^4 = 4,294,967,296 possible values.

What HEX color is closest to a specific Pantone or RAL color?

Pantone and RAL are physical color systems used in print and manufacturing. Their exact HEX equivalents depend on the medium and viewing conditions, but many online references provide approximate HEX conversions. Enter the RGB values from a Pantone/RAL conversion chart into this tool to get the HEX equivalent.