HEX to RGB converter
Type a hex code to get its RGB values, or change any field to update the rest.
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
| HEX | Named color | RGB | HSL |
|---|---|---|---|
#FF5733 | — | rgb(255, 87, 51) | hsl(11, 100%, 60%) |
#3366CC | — | rgb(51, 102, 204) | hsl(220, 60%, 50%) |
#2E8B57 | Sea Green | rgb(46, 139, 87) | hsl(146, 50%, 36%) |
#FFD700 | Gold | rgb(255, 215, 0) | hsl(51, 100%, 50%) |
#800080 | Purple | rgb(128, 0, 128) | hsl(300, 100%, 25%) |
#FF69B4 | Hot Pink | rgb(255, 105, 180) | hsl(330, 100%, 71%) |
#000080 | Navy | rgb(0, 0, 128) | hsl(240, 100%, 25%) |
#F5F5DC | Beige | rgb(245, 245, 220) | hsl(60, 56%, 91%) |
#008080 | Teal | rgb(0, 128, 128) | hsl(180, 100%, 25%) |
#C0C0C0 | Silver | rgb(192, 192, 192) | hsl(0, 0%, 75%) |
#A52A2A | Brown | rgb(165, 42, 42) | hsl(0, 59%, 41%) |
#FFA500 | Orange | rgb(255, 165, 0) | hsl(39, 100%, 50%) |
#E6E6FA | Lavender | rgb(230, 230, 250) | hsl(240, 67%, 94%) |
#4B0082 | Indigo | rgb(75, 0, 130) | hsl(275, 100%, 25%) |
#40E0D0 | Turquoise | rgb(64, 224, 208) | hsl(174, 72%, 56%) |
#DC143C | Crimson | rgb(220, 20, 60) | hsl(348, 83%, 47%) |