Color Converter

Paste a color in any format and every other format appears as you type: HEX, HEX with alpha, RGB, HSL, HWB, OKLCH, OKLab, CIE Lab and LCH, plus an approximate CMYK. You also get the nearest Tailwind CSS class and CSS color name, contrast against white and black, tints and shades, ready-to-paste code for CSS, Tailwind, SwiftUI, Flutter and Android, and a searchable table of all 148 HTML color names.

How it works

  1. Type or paste a color into the box. It accepts #4F98FB, #4F98FB80, 4f98fb, rgb(79, 152, 251), rgb(79 152 251 / 50%), hsl(215 96% 65%), hwb(), oklch(), oklab(), lab(), lch(), cmyk(69%, 39%, 0%, 2%), bare numbers like 79, 152, 251, and names such as cornflowerblue. A whole CSS line like color: #4F98FB; works too.
  2. Use the color picker or the alpha slider to adjust. The slider sets transparency, and every format that supports alpha updates with it.
  3. Click Copy next to any format, or copy a ready-made snippet for CSS variables, Tailwind, SwiftUI, Flutter or Android.
  4. Check the nearest Tailwind class and CSS name. The match score tells you how close they are; zero means identical.
  5. Click any tint, shade, match or row in the HTML color names table to load it into the converter. The address bar keeps the current color, so you can bookmark or share it.

All 148 HTML color names

NameHEXRGB
aliceblue#F0F8FFrgb(240, 248, 255)
antiquewhite#FAEBD7rgb(250, 235, 215)
aqua#00FFFFrgb(0, 255, 255)
aquamarine#7FFFD4rgb(127, 255, 212)
azure#F0FFFFrgb(240, 255, 255)
beige#F5F5DCrgb(245, 245, 220)
bisque#FFE4C4rgb(255, 228, 196)
black#000000rgb(0, 0, 0)
blanchedalmond#FFEBCDrgb(255, 235, 205)
blue#0000FFrgb(0, 0, 255)
blueviolet#8A2BE2rgb(138, 43, 226)
brown#A52A2Argb(165, 42, 42)
burlywood#DEB887rgb(222, 184, 135)
cadetblue#5F9EA0rgb(95, 158, 160)
chartreuse#7FFF00rgb(127, 255, 0)
chocolate#D2691Ergb(210, 105, 30)
coral#FF7F50rgb(255, 127, 80)
cornflowerblue#6495EDrgb(100, 149, 237)
cornsilk#FFF8DCrgb(255, 248, 220)
crimson#DC143Crgb(220, 20, 60)
cyan#00FFFFrgb(0, 255, 255)
darkblue#00008Brgb(0, 0, 139)
darkcyan#008B8Brgb(0, 139, 139)
darkgoldenrod#B8860Brgb(184, 134, 11)
darkgray#A9A9A9rgb(169, 169, 169)
darkgreen#006400rgb(0, 100, 0)
darkgrey#A9A9A9rgb(169, 169, 169)
darkkhaki#BDB76Brgb(189, 183, 107)
darkmagenta#8B008Brgb(139, 0, 139)
darkolivegreen#556B2Frgb(85, 107, 47)
darkorange#FF8C00rgb(255, 140, 0)
darkorchid#9932CCrgb(153, 50, 204)
darkred#8B0000rgb(139, 0, 0)
darksalmon#E9967Argb(233, 150, 122)
darkseagreen#8FBC8Frgb(143, 188, 143)
darkslateblue#483D8Brgb(72, 61, 139)
darkslategray#2F4F4Frgb(47, 79, 79)
darkslategrey#2F4F4Frgb(47, 79, 79)
darkturquoise#00CED1rgb(0, 206, 209)
darkviolet#9400D3rgb(148, 0, 211)
deeppink#FF1493rgb(255, 20, 147)
deepskyblue#00BFFFrgb(0, 191, 255)
dimgray#696969rgb(105, 105, 105)
dimgrey#696969rgb(105, 105, 105)
dodgerblue#1E90FFrgb(30, 144, 255)
firebrick#B22222rgb(178, 34, 34)
floralwhite#FFFAF0rgb(255, 250, 240)
forestgreen#228B22rgb(34, 139, 34)
fuchsia#FF00FFrgb(255, 0, 255)
gainsboro#DCDCDCrgb(220, 220, 220)
ghostwhite#F8F8FFrgb(248, 248, 255)
gold#FFD700rgb(255, 215, 0)
goldenrod#DAA520rgb(218, 165, 32)
gray#808080rgb(128, 128, 128)
green#008000rgb(0, 128, 0)
greenyellow#ADFF2Frgb(173, 255, 47)
grey#808080rgb(128, 128, 128)
honeydew#F0FFF0rgb(240, 255, 240)
hotpink#FF69B4rgb(255, 105, 180)
indianred#CD5C5Crgb(205, 92, 92)
indigo#4B0082rgb(75, 0, 130)
ivory#FFFFF0rgb(255, 255, 240)
khaki#F0E68Crgb(240, 230, 140)
lavender#E6E6FArgb(230, 230, 250)
lavenderblush#FFF0F5rgb(255, 240, 245)
lawngreen#7CFC00rgb(124, 252, 0)
lemonchiffon#FFFACDrgb(255, 250, 205)
lightblue#ADD8E6rgb(173, 216, 230)
lightcoral#F08080rgb(240, 128, 128)
lightcyan#E0FFFFrgb(224, 255, 255)
lightgoldenrodyellow#FAFAD2rgb(250, 250, 210)
lightgray#D3D3D3rgb(211, 211, 211)
lightgreen#90EE90rgb(144, 238, 144)
lightgrey#D3D3D3rgb(211, 211, 211)
lightpink#FFB6C1rgb(255, 182, 193)
lightsalmon#FFA07Argb(255, 160, 122)
lightseagreen#20B2AArgb(32, 178, 170)
lightskyblue#87CEFArgb(135, 206, 250)
lightslategray#778899rgb(119, 136, 153)
lightslategrey#778899rgb(119, 136, 153)
lightsteelblue#B0C4DErgb(176, 196, 222)
lightyellow#FFFFE0rgb(255, 255, 224)
lime#00FF00rgb(0, 255, 0)
limegreen#32CD32rgb(50, 205, 50)
linen#FAF0E6rgb(250, 240, 230)
magenta#FF00FFrgb(255, 0, 255)
maroon#800000rgb(128, 0, 0)
mediumaquamarine#66CDAArgb(102, 205, 170)
mediumblue#0000CDrgb(0, 0, 205)
mediumorchid#BA55D3rgb(186, 85, 211)
mediumpurple#9370DBrgb(147, 112, 219)
mediumseagreen#3CB371rgb(60, 179, 113)
mediumslateblue#7B68EErgb(123, 104, 238)
mediumspringgreen#00FA9Argb(0, 250, 154)
mediumturquoise#48D1CCrgb(72, 209, 204)
mediumvioletred#C71585rgb(199, 21, 133)
midnightblue#191970rgb(25, 25, 112)
mintcream#F5FFFArgb(245, 255, 250)
mistyrose#FFE4E1rgb(255, 228, 225)
moccasin#FFE4B5rgb(255, 228, 181)
navajowhite#FFDEADrgb(255, 222, 173)
navy#000080rgb(0, 0, 128)
oldlace#FDF5E6rgb(253, 245, 230)
olive#808000rgb(128, 128, 0)
olivedrab#6B8E23rgb(107, 142, 35)
orange#FFA500rgb(255, 165, 0)
orangered#FF4500rgb(255, 69, 0)
orchid#DA70D6rgb(218, 112, 214)
palegoldenrod#EEE8AArgb(238, 232, 170)
palegreen#98FB98rgb(152, 251, 152)
paleturquoise#AFEEEErgb(175, 238, 238)
palevioletred#DB7093rgb(219, 112, 147)
papayawhip#FFEFD5rgb(255, 239, 213)
peachpuff#FFDAB9rgb(255, 218, 185)
peru#CD853Frgb(205, 133, 63)
pink#FFC0CBrgb(255, 192, 203)
plum#DDA0DDrgb(221, 160, 221)
powderblue#B0E0E6rgb(176, 224, 230)
purple#800080rgb(128, 0, 128)
rebeccapurple#663399rgb(102, 51, 153)
red#FF0000rgb(255, 0, 0)
rosybrown#BC8F8Frgb(188, 143, 143)
royalblue#4169E1rgb(65, 105, 225)
saddlebrown#8B4513rgb(139, 69, 19)
salmon#FA8072rgb(250, 128, 114)
sandybrown#F4A460rgb(244, 164, 96)
seagreen#2E8B57rgb(46, 139, 87)
seashell#FFF5EErgb(255, 245, 238)
sienna#A0522Drgb(160, 82, 45)
silver#C0C0C0rgb(192, 192, 192)
skyblue#87CEEBrgb(135, 206, 235)
slateblue#6A5ACDrgb(106, 90, 205)
slategray#708090rgb(112, 128, 144)
slategrey#708090rgb(112, 128, 144)
snow#FFFAFArgb(255, 250, 250)
springgreen#00FF7Frgb(0, 255, 127)
steelblue#4682B4rgb(70, 130, 180)
tan#D2B48Crgb(210, 180, 140)
teal#008080rgb(0, 128, 128)
thistle#D8BFD8rgb(216, 191, 216)
tomato#FF6347rgb(255, 99, 71)
turquoise#40E0D0rgb(64, 224, 208)
violet#EE82EErgb(238, 130, 238)
wheat#F5DEB3rgb(245, 222, 179)
white#FFFFFFrgb(255, 255, 255)
whitesmoke#F5F5F5rgb(245, 245, 245)
yellow#FFFF00rgb(255, 255, 0)
yellowgreen#9ACD32rgb(154, 205, 50)

Which color format should you use?

HEX is the most common format on the web and in design tools, and it is what most people mean by HTML color codes. It is compact and easy to paste, but hard to adjust by hand. RGB says the same thing in decimal numbers from 0 to 255, which is handy in JavaScript and when a tool asks for separate red, green and blue values.

HSL and HWB describe the same sRGB colors in a way people can reason about: pick a hue on the color wheel, then adjust saturation and lightness (or whiteness and blackness). They are good for quick tweaks, but their lightness does not match how bright a color looks; a yellow and a blue at 50% lightness look very different.

OKLCH, OKLab, Lab and LCH are perceptual formats. Their lightness numbers track how bright colors appear, and OKLCH and Lab can also describe colors outside sRGB for wide-gamut screens. For a modern design system, OKLCH is a sensible default: it is supported in all current major browsers and it is what Tailwind CSS 4 uses.

Alpha, HEX8 and transparency

Alpha controls opacity from 0 (invisible) to 1 (solid). In HEX it is the optional fourth pair, so #4F98FB80 is the brand blue at about 50%. In functional formats modern CSS puts it after a slash, as in rgb(79 152 251 / 50%) or oklch(68% 0.164 256.7 / 0.5); the older rgba() and hsla() comma forms still work everywhere.

A translucent color has no single contrast ratio, because what you see depends on what is behind it. The contrast figures in this tool composite your color over white and over black before measuring, so they match what a reader would see on those backgrounds.

Screens, print and why colors shift

Screens make color by adding red, green and blue light; printers make it by laying cyan, magenta, yellow and black ink on paper that reflects light. The two systems cover different ranges of color. Bright screen blues and greens often have no exact ink equivalent, and some ink colors have no exact screen equivalent, which is why a logo can look duller in print than on a website.

The CMYK shown above uses the plain formula with no color profile. Professional print conversion uses an ICC profile that describes a specific press, ink set and paper, and it can give very different numbers. Use this value to start a conversation with your printer, not as the final spec.

Tips

Frequently asked questions

How do I convert HEX to RGB?

Split the six characters into three pairs and read each pair as a base-16 number. For #4F98FB: 4F is 79, 98 is 152 and FB is 251, so the color is rgb(79, 152, 251). Paste any hex code above and the RGB value, plus every other format, appears instantly.

What is OKLCH and why do people use it?

OKLCH describes a color by lightness, chroma (how colorful it is) and hue, using the OKLab model, which was designed so equal number changes look like roughly equal visual changes. That makes palettes, hover states and dark-mode variants easier to build than with HSL, where two colors with the same lightness number can look very different. Tailwind CSS version 4 defines its default palette in OKLCH.

How is the nearest Tailwind color or CSS name chosen?

Your color and every candidate are converted to OKLab and the one with the smallest straight-line distance wins. The score shown is that distance times 100: under 2 is very hard to tell apart, under 5 is close, and above 10 the name is only a rough guide. Tailwind candidates are the 288 default colors in Tailwind CSS 4.3, including black and white.

Is the CMYK value accurate for printing?

No, it is an approximation. Real CMYK depends on the inks, the paper and the printer's color profile, so the same RGB color can need quite different CMYK values on coated and uncoated stock. This tool uses the simple device formula with no profile, which is fine for a rough idea or a quick mock-up. For brand print work, ask your printer or designer to convert using the ICC profile for that job.

Can I convert Pantone colors here?

No. Pantone's color libraries and their official screen values are proprietary and licensed, so we do not publish them, and many Pantone spot inks are brighter than any normal screen can show anyway. To get a web color for a Pantone shade, look it up in Pantone's own tools or your printed guide, then paste the HEX or RGB value they give you into this converter for every other format.

How many HTML color names are there?

CSS defines 148 named colors, which all modern browsers support. Some are duplicates under two names: aqua and cyan, fuchsia and magenta, and seven gray colors that also have a grey spelling. rebeccapurple was the last name added. The keywords transparent and currentcolor are not counted as named colors.

Is anything I type sent to a server?

No. All conversion happens in your browser. The color in the address bar sits after the # sign, which browsers do not send to servers.

Related: HEX color picker, Color palette generator, Tailwind color palette generator, Color contrast checker, Color name finder.

Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.

More in Free Tools

We.Inc is an AI-powered website builder you can resell under your own brand. Launch a branded client dashboard, bill on Stripe Connect, and deliver AI-generated websites in minutes. White-label plans start at $99 a month for 25 client sites, with a 7-day free trial and no per-site fees.

Product

Who It's For

Features

Resources

Company

View Sitemap