ForHosting KIT · Images

OKLab ΔE (ΔEOK) calculator

Paste two sRGB hex codes and get their ΔEOK, the straight-line distance between them in OKLab: #000000 against itself gives 0, and the further apart the colors, the larger the number. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Hex1
#000000
Hex2
#000000
Decimal places
6
You get
Delta e ok
0

Euclidean distance in OKLab between two sRGB hex colors. Search intent: OKLab delta E calculator. No network calls or random seeds are required. Failed jobs are not billed.

A single distance between two colors

OKLab describes each color with three numbers: L for lightness, and a and b for two color axes. ΔEOK, also called delta E OKLab, treats those three numbers as a position and measures the straight line between two positions. Enter two sRGB hex colors, the same codes you would copy from a design file or a style sheet, and the calculator converts both to OKLab before measuring. When the two codes are the same, as with #000000 and #000000, the distance is 0. The more the lightness, hue or intensity of the colors drift apart, the larger the result.

How it is worked out and when to use it

The calculation subtracts the L, a and b values of the second color from those of the first, squares each difference, adds the three squares and takes the square root. Because each difference is squared, swapping the two colors gives the same answer. You can set how many decimals to keep; rounding is applied once to the full result. Use it to check whether two versions of a brand color still match, to space out shades in a palette or to spot near-duplicates in a list of colors. A common mistake is to compare this number with ΔE values from other formulas: each one has its own scale, so set tolerances with the same formula throughout.

Teaching

Pinned goldens.

What does delta E OKLab measure?

It measures how far apart two colors are in the OKLab color space. The tool converts both sRGB hex colors to OKLab and returns the straight-line distance between them, so identical colors give 0.

What is the ΔEOK formula?

ΔEOK is the square root of ΔL² + Δa² + Δb²: take the difference in lightness L and in the a and b color axes, square each one, add them and take the square root.

Which colors can I compare?

Two colors written as sRGB hex codes, such as #000000. Enter the first and the second color; the order does not change the distance, because the formula only uses squared differences.

Can I round the result?

Yes. Choose the number of decimals, for example 6. Rounding happens once, with halves going up, on the unrounded distance.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/color/delta-e-ok

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/color/delta-e-ok \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"hex1":"#ff0000","hex2":"#00ff00"}'
{
  "hex1": "#ff0000",
  "hex2": "#00ff00"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "color.delta_e_ok",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS hooks, automation, or teaching demos.

How it works

Euclidean distance in OKLab between two sRGB hex colors. ΔEOK = √(ΔL²+Δa²+Δb²) in OKLab. No network calls or random seeds are required. Failed jobs are not billed. No network calls or random seeds are required. Failed jobs are not billed. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS hooks, automation, or teaching demos. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS hooks, automation, or teaching demos.

Inputs, limits and rounding

Optional decimals use half-up once. Optional output fields are omitted, never null. No network calls or random seeds are required. Failed jobs are not billed. No network calls or random seeds are required. Provide required JSON fields with DOM-safe names. Invalid types raise invalid_input. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS hooks, automation, or teaching demos. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS hooks,

When to use it

Use when search intent matches. Euclidean distance in OKLab between two sRGB hex colors. EN-only delivery; Nitro hydrates locales. No network calls or random seeds are required. Failed jobs are not billed. No network calls or random seeds are required. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS hooks, automation, or teaching demos. The calculator is free in the browser, deterministic, and identical on the API path. Inputs are validated before arithmetic so invalid payloads fail with invalid_input. Half-up rounding is applied once from raw IEEE values when decimals are requested. Use the same JSON from spreadsheets, CMS hooks, automation, or teaching demos.

Quick check

Free widget.

Automation

API same JSON.

Free?

Yes tier A.

Network?

No.

Bad input?

invalid_input.

API?

Yes.

Locales?

EN-only; Nitro hydrates.

Read the full KIT documentation →