TintShelf
Interface

HEX to RGB converter

Type a hex code to get its RGB values, or change any field to update the rest.

RGB
HSL
CMYK
HEX
RGB
HSL
HSV
CMYK
OKLCH
LAB

Contrast with white :1, with black :1.

What is a hex code?

A hex code is three pairs of base-16 digits, one each for red, green and blue: FF is 255, 80 is 128 and 00 is 0. Three-digit codes such as #F53 are shorthand that doubles each digit.

How do you convert hex to RGB?

Split the hex code into its three pairs and turn each pair from base 16 into a number from 0 to 255: #FF8000 becomes FF, 80 and 00, which is rgb(255, 128, 0).

Every field here is live, so you can also type RGB, HSL or CMYK and read the hex code back. The RGB result pastes straight into CSS rgb() or rgba().

Ready answers

HEXNamed colorRGBHSL
#FF5733—rgb(255, 87, 51)hsl(11, 100%, 60%)
#3366CC—rgb(51, 102, 204)hsl(220, 60%, 50%)
#2E8B57Sea Greenrgb(46, 139, 87)hsl(146, 50%, 36%)
#FFD700Goldrgb(255, 215, 0)hsl(51, 100%, 50%)
#800080Purplergb(128, 0, 128)hsl(300, 100%, 25%)
#FF69B4Hot Pinkrgb(255, 105, 180)hsl(330, 100%, 71%)
#000080Navyrgb(0, 0, 128)hsl(240, 100%, 25%)
#F5F5DCBeigergb(245, 245, 220)hsl(60, 56%, 91%)
#008080Tealrgb(0, 128, 128)hsl(180, 100%, 25%)
#C0C0C0Silverrgb(192, 192, 192)hsl(0, 0%, 75%)
#A52A2ABrownrgb(165, 42, 42)hsl(0, 59%, 41%)
#FFA500Orangergb(255, 165, 0)hsl(39, 100%, 50%)
#E6E6FALavenderrgb(230, 230, 250)hsl(240, 67%, 94%)
#4B0082Indigorgb(75, 0, 130)hsl(275, 100%, 25%)
#40E0D0Turquoisergb(64, 224, 208)hsl(174, 72%, 56%)
#DC143CCrimsonrgb(220, 20, 60)hsl(348, 83%, 47%)

Related tools

Screens show the same code differently, and print adds more variation. CMYK here is the plain formula without a printer profile, so use it as a starting point, not a press value. Contrast numbers follow WCAG 2.x.