Convert colours between HEX, RGB, HSL, OKLCH, Lab and five more formats, check WCAG contrast, and preview colour-blind vision.
Initializing in your browser…
Generate colour palettes from one base colour, with tints and shades, contrast and colour-blindness checks, and CSS, Tailwind or JSON export.
Pick a colour visually, from the screen or by typing it, and copy it in ten formats with contrast, the nearest name and colour blindness previews.
Convert Unix timestamps to dates and dates to timestamps in any time zone, with seconds, milliseconds, microseconds and nanoseconds detected automatically.
A brand colour arrives as #E07A5F and is needed in CSS as OKLCH, checked as a text colour on white, and checked for colour-blind readers.
Colour
#E07A5F
Formats and checks
RGB rgb(224, 122, 95) HSL hsl(12.6, 67.5%, 62.5%) OKLCH oklch(0.68782 0.13312 35.778) CMYK cmyk(0%, 45.5%, 57.6%, 12.2%) Lab lab(62.17 37.05 32.32) under D65 Lab lab(62.7 38.69 33.22) under D50 Nearest CSS name: salmon, 6.5 dE2000 away On white: 2.95:1, fails AA for body and large text Black text on it: 7.12:1, passes AAA Deuteranopia: #A5A559, shifts 34.8 dE2000
All of these describe the same colour; only the notation changes. The Lab values differ between D65 and D50 because Lab depends on the white point, so copy the D50 figures into CSS lab() and print software. As text on a white background this orange reaches only 2.95 to 1, below the 3 to 1 needed even for large text, while black text on top of it reaches 7.12 to 1, so it works far better as a background than as a text colour. Under deuteranopia it shifts towards an olive yellow, which matters if it is used to signal something next to green.
Type a colour in any common notation, such as #1E90FF, rgb(), hsl(), oklch() or a CSS name like tomato, and get it in ten formats at once, each one click to copy. The same tool checks text and background colours against the WCAG contrast rules, suggests colour harmonies, and shows how the colour looks to people with colour vision deficiencies.
Colour on the web starts as three numbers for red, green and blue, but different jobs need different notations. HEX is compact and universal in CSS and design tools. RGB spells out the same numbers. HSL and HSV describe a colour by hue, saturation and lightness or brightness, which makes it easy to adjust by hand, and HSV is what most colour pickers show. OKLCH, part of CSS Color 4, is designed so that equal steps look equally different, which makes it the best choice for building tints, shades and accessible palettes. Lab and LCH are the long-standing CIE perceptual spaces used in print and colour science, and XYZ is the reference space they are built on. CMYK is shown as a simple ink estimate; real print colour depends on the paper, inks and an ICC profile, which a converter cannot know.
The input box reads almost anything you paste: 3, 4, 6 and 8 digit hex with or without the #, rgb() and rgba() with commas or spaces, hsl(), hwb(), lab(), lch(), oklab(), oklch() and all 148 CSS colour names. Below the box the tool says how it read your input and names the nearest CSS colour, with the distance in dE2000, a standard measure of how different two colours look. If you type something it cannot read, it says so and keeps showing the last valid colour. Tap the swatch to open your device's colour picker, or use From screen in browsers that support picking a colour anywhere on the screen.
Lab, LCH and XYZ depend on a white point. D65, daylight, is what sRGB and most of the web use; D50 is the print and ICC standard and is also what the CSS lab() and lch() functions use. Switch between them to get values that match the system you are copying into. The other formats are not affected.
The Contrast view puts your colour on a background of your choice, previews real text, and reports the WCAG 2 contrast ratio with pass or fail for AA and AAA at body and large text sizes: 4.5 to 1 is the usual minimum for body text, 3 to 1 for large text. The Harmony view rotates the hue to give complementary, triadic, tetradic, analogous and split-complementary sets, plus lighter and darker versions; click any swatch to copy it. The Colour vision view simulates protanopia, deuteranopia, tritanopia and achromatopsia with established models computed in linear light, and says how far each simulated colour shifts, which helps you avoid pairs that look the same to some readers.
Everything runs in your browser. The share link carries the colours and the view you are on, and your recent colours are kept in this browser only.
Copy a brand colour from a design file as HEX and paste it into CSS as OKLCH or into a spreadsheet as RGB, without retyping numbers.
Test a text colour on its background before shipping a design, and adjust until body text reaches at least 4.5 to 1.
See whether a red and a green used for status messages stay distinguishable under deuteranopia, the most common form.
Start from one colour and pick a complementary accent or analogous neighbours from the Harmony view.
Both describe hue and saturation, but HSL uses lightness, where 100 percent is always white, and HSV uses value or brightness, where 100 percent is the most vivid version of the hue. Design apps and colour pickers mostly use HSV, also called HSB.
OKLCH is a perceptual colour space: a change of 10 in lightness looks about the same at any hue, which is not true of HSL. That makes it reliable for generating tints and shades and for keeping contrast predictable. All current major browsers support oklch() in CSS.
No. It is a straightforward mathematical conversion. Real print colour depends on the press, paper and inks, described by an ICC profile, so ask your printer or use a design app with the right profile for final artwork.
WCAG 2 level AA needs at least 4.5 to 1 for body text and 3 to 1 for large text (24px, or 18.66px bold). Level AAA needs 7 to 1 and 4.5 to 1. The Contrast view shows all four results.
Usually the white point. Lab under D65 and Lab under D50 give different numbers for the same colour. CSS lab() and most print software use D50; many web tools use D65. Switch the white point to match.
It is a standard measure of how different two colours look. Below about 1 the difference is invisible, around 2 to 3 it is noticeable side by side, and above 10 they look like different colours.
Conversions run on your device in JavaScript. The values you enter are never sent over the network.