Hex to RGB
Convert a hex colour (3, 4, 6 or 8 digits) to RGB or RGBA with the alpha as 0–1 and a percentage, and see a preview. Copy the CSS. Free and private.
Need other colour formats? Use the Colour Converter.
64 common colours
| Name | Hex | RGB |
|---|---|---|
| Black | #000000 | rgb(0, 0, 0) |
| White | #ffffff | rgb(255, 255, 255) |
| Red | #ff0000 | rgb(255, 0, 0) |
| Lime | #00ff00 | rgb(0, 255, 0) |
| Blue | #0000ff | rgb(0, 0, 255) |
| Yellow | #ffff00 | rgb(255, 255, 0) |
| Cyan | #00ffff | rgb(0, 255, 255) |
| Magenta | #ff00ff | rgb(255, 0, 255) |
| Silver | #c0c0c0 | rgb(192, 192, 192) |
| Gray | #808080 | rgb(128, 128, 128) |
| Maroon | #800000 | rgb(128, 0, 0) |
| Olive | #808000 | rgb(128, 128, 0) |
| Green | #008000 | rgb(0, 128, 0) |
| Purple | #800080 | rgb(128, 0, 128) |
| Teal | #008080 | rgb(0, 128, 128) |
| Navy | #000080 | rgb(0, 0, 128) |
| Orange | #ffa500 | rgb(255, 165, 0) |
| Pink | #ffc0cb | rgb(255, 192, 203) |
| Brown | #a52a2a | rgb(165, 42, 42) |
| Gold | #ffd700 | rgb(255, 215, 0) |
| Coral | #ff7f50 | rgb(255, 127, 80) |
| Salmon | #fa8072 | rgb(250, 128, 114) |
| Tomato | #ff6347 | rgb(255, 99, 71) |
| Crimson | #dc143c | rgb(220, 20, 60) |
| Indigo | #4b0082 | rgb(75, 0, 130) |
| Violet | #ee82ee | rgb(238, 130, 238) |
| Orchid | #da70d6 | rgb(218, 112, 214) |
| Plum | #dda0dd | rgb(221, 160, 221) |
| Turquoise | #40e0d0 | rgb(64, 224, 208) |
| Aquamarine | #7fffd4 | rgb(127, 255, 212) |
| Sky blue | #87ceeb | rgb(135, 206, 235) |
| Steel blue | #4682b4 | rgb(70, 130, 180) |
| Royal blue | #4169e1 | rgb(65, 105, 225) |
| Dodger blue | #1e90ff | rgb(30, 144, 255) |
| Forest green | #228b22 | rgb(34, 139, 34) |
| Sea green | #2e8b57 | rgb(46, 139, 87) |
| Spring green | #00ff7f | rgb(0, 255, 127) |
| Chartreuse | #7fff00 | rgb(127, 255, 0) |
| Khaki | #f0e68c | rgb(240, 230, 140) |
| Beige | #f5f5dc | rgb(245, 245, 220) |
| Ivory | #fffff0 | rgb(255, 255, 240) |
| Lavender | #e6e6fa | rgb(230, 230, 250) |
| Chocolate | #d2691e | rgb(210, 105, 30) |
| Sienna | #a0522d | rgb(160, 82, 45) |
| Tan | #d2b48c | rgb(210, 180, 140) |
| Slate gray | #708090 | rgb(112, 128, 144) |
| Dark gray | #a9a9a9 | rgb(169, 169, 169) |
| Light gray | #d3d3d3 | rgb(211, 211, 211) |
| Indigo (brand) | #6366f1 | rgb(99, 102, 241) |
| Sky (brand) | #38bdf8 | rgb(56, 189, 248) |
| Emerald | #10b981 | rgb(16, 185, 129) |
| Amber | #f59e0b | rgb(245, 158, 11) |
| Rose | #f43f5e | rgb(244, 63, 94) |
| Slate 900 | #0f172a | rgb(15, 23, 42) |
| Slate 500 | #64748b | rgb(100, 116, 139) |
| Slate 100 | #f1f5f9 | rgb(241, 245, 249) |
| Teal 500 | #14b8a6 | rgb(20, 184, 166) |
| Violet 500 | #8b5cf6 | rgb(139, 92, 246) |
| Pink 500 | #ec4899 | rgb(236, 72, 153) |
| Red 500 | #ef4444 | rgb(239, 68, 68) |
| Orange 500 | #f97316 | rgb(249, 115, 22) |
| Lime 500 | #84cc16 | rgb(132, 204, 22) |
| Cyan 500 | #06b6d4 | rgb(6, 182, 212) |
| Blue 500 | #3b82f6 | rgb(59, 130, 246) |
Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)
Next steps
Done here? Use the Send to… menu on the result to carry it on to RGB to Hex.
Free Hex to RGB
Type a hex colour such as #6366f1 and get the red, green and blue values for CSS. Colours with transparency are supported. It gives developers a quick browser-based way to solve a focused hex to rgb task before moving the result into a project.
How to use Hex to RGB
Short colours (#f00) and colours with an alpha part (#6366f180) work too. Copy the CSS line you need.
Common mistakes
- Using 5 or 7 digits: a hex colour has 3, 4, 6 or 8.
- Forgetting the alpha part is the last pair, not the first.
Frequently asked questions
How is hex turned into RGB?
The six digits are three pairs: red, green and blue. Each pair is a hex number from 0 to 255. #6366f1 is 63 → 99, 66 → 102 and f1 → 241.
What are 3, 4 and 8 digit colours?
Three digits repeat each digit (#f00 is #ff0000). Four and eight digits add an alpha (transparency) part at the end.
What is alpha?
How opaque the colour is, from 0 (clear) to 1 (solid). In hex it is a number from 00 to FF.
Is anything uploaded?
No. The conversion runs in your browser.
How do I use this hex to rgb tool?
Use the interactive controls above; processing stays in your browser and the result is intended as a practical starting point for development work.
More Code & Conversion
Unix Timestamp ConverterTurn computer time into a real dateTimezone ConverterFind the time in other citiesNumber / Byte FormatterTurn bytes into KB, MB and GBCron ParserUnderstand a cron schedule in plain EnglishBase ConverterConvert binary, decimal and hex numbersCase ConverterChange text to UPPER, lower, Title caseSlug GeneratorMake clean web addresses from titlesSubnet CIDR CalculatorWork out IP ranges for networks