Enter a color
In any CSS format, or use the color picker.
Type or pick a color and see it in every common format, ready to copy. Any CSS color works: hex codes, rgb(), hsl(), oklch() or names like tomato.
100% private — the calculation is done in your browser and nothing is sent to any server.
Keep going with your result in another tool. Nothing is uploaded.
In any CSS format, or use the color picker.
HEX, RGB, HSL, HSV, HWB, CMYK and OKLCH.
Each value has its own copy button.
Designers give you a hex code, a stylesheet wants HSL, a print job asks for CMYK, a design token uses OKLCH and an image editor talks in RGB. A single color has many faces, and moving between them by hand is error-prone. This converter takes any color you can write in CSS and shows all the common representations at once.
Anything the browser understands as a CSS color: hex in three, six or eight digits, with or without the hash, rgb() and hsl() in either syntax, hwb(), lab(), lch(), oklab(), oklch(), color() and the 140 or so named colors. A picker is also provided. The swatch shows the color, with a checkerboard behind it so that transparency is visible.
Two figures show the contrast ratio of the color against white and against black, using the WCAG formula. It gives a quick idea of which text color to put on top: a ratio of 4.5:1 or more is needed for normal text to be considered accessible. For a full check of a text and background pair, use the contrast checker.
Rounded values can differ by one unit from what another program shows. Colors outside the standard RGB range, such as those in wide-gamut spaces, are converted to the nearest representable one. There is no color management or profile, so CMYK values should be checked in your print workflow.
More utilities that also run without leaving your browser.