EditSafely

Convert a Hex Color to LAB

Convert a color in hex #rrggbb format to LAB format.

Runs on your device, nothing uploaded

White point
Try:

0 chars · 0 lines

Output

Convert a color in hex #rrggbb format to LAB format.

Type or paste above to see the result here.

Example: White

What you paste never leaves this tab

Convert a Hex Color to LAB is JavaScript that your browser has already downloaded, and it does the whole job on your own machine. On a normal site, whatever you type in is sent to a server that can log it, cache it or keep it. Here it is read and transformed inside this tab and nowhere else.

  • No upload
  • No length limit
  • Works offline once loaded
  • Nothing stored or logged

How to use Convert a Hex Color to LAB

  1. 1. Paste the hex colour. Enter a colour like #ff0000 or pick one with the colour picker. One colour per line converts a list.
  2. 2. Pick the white point. D65 gives the L*a*b* values most converters and ΔE formulas use, such as lab(53.24, 80.09, 67.2) for red. D50 writes the CSS lab() syntax, lab(54.29% 80.81 69.89), that a stylesheet reads as the same red.
  3. 3. Copy the values. Copy the Lab result, or any other format from the list under the swatch, for a colour difference check, a print workflow or CSS.

When to use Convert a Hex Color to LAB

Convert a Hex Color to LAB moves a color into the perceptually uniform CIELAB space, where numeric distance roughly matches how different two colors look to a human. Reach for it when hex arithmetic gives misleading answers about similarity, contrast or lightness.

  • Measuring perceptual color difference. To compute a delta E between a brand color and what a printer or display actually produced, both colors must be in LAB first. Convert the hex references here before running the formula.
  • Sorting a palette by real lightness. Ordering swatches by hex value or even HSL lightness produces jarring ramps. The L component from this conversion sorts colors the way an eye would, from dark to light.
  • Adopting CSS lab() colors. Modern CSS supports lab() notation for wider gamuts and better interpolation. Convert your existing hex tokens to see their LAB coordinates before migrating gradients to the new syntax.
  • Preparing data for a color study. A UX experiment on color perception needs stimuli described in a device-independent space. Convert every hex stimulus to LAB so the paper reports coordinates reviewers can reproduce.

Examples

White

Input

#ffffff

Output

lab(100, 0, 0)

Red

Input

#ff0000

Output

lab(53.24, 80.09, 67.2)

About the Convert a Hex Color to LAB tool

Convert a Hex Color to LAB does its work locally, right in the browser. Convert a color in hex #rrggbb format to LAB format. There is no upload step, no queue and no account, and your data never travels over the network.

It belongs to the Hex Tools collection on EditSafely, a set of 108 small, focused Hex utilities that share the same instant, private workspace.

You can shape the output with the White point setting, and the result refreshes the moment you change it. 2 worked examples further down the page show exactly what the tool produces for real inputs.

Running locally also makes the tool fast and dependable: results appear as soon as your input does, there is no server outage that can take it down mid-task, and confidential data can be processed without a second thought.

Frequently asked questions

Does Convert a Hex Color to LAB cost anything?

Yes, it is completely free. All 2,943 tools on EditSafely work without an account, a subscription or usage limits.

Is it safe to paste sensitive or confidential data?

No data leaves your device. The whole tool is JavaScript that runs inside your browser tab, so there is no upload, no server-side processing and no log of what you did. If you disconnect from the internet after the page loads, it keeps working.

How much text can I process at once?

There is no fixed limit; your device's memory is the ceiling. Up to 10 MB the result updates as you type, after a short pause that grows with the size. Above 10 MB a Run button appears so typing stays smooth, and files open up to 50 MB. A very long result shows its first 2,000 lines on screen, while Copy and Download always include all of it.

Do I need to sign up or install anything?

Nothing to install and no account needed. Open the page in any up-to-date browser, including on a phone or tablet, and the tool is ready.

How do I use the result?

The output panel has a one-click copy button, and you can keep refining the input while you work; the result updates in place as you type.

Related tools

All Hex Tools →