# colorDistance

Canonical: https://docs.shumoku.dev/en/library/api/colorDistance
Language: en

@shumoku/core · 0.6.1 · function

# colorDistance

[Source](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/libs/@shumoku/core/src/themes/tone.ts#L118)

How different two colours look: their OKLab distance, in which \`OK\_JND\` is just noticed.

```
colorDistance(p: string, q: string): number
```

## Parameters

| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| `p` | `string` | No additional description. | `—` |
| `q` | `string` | No additional description. | `—` |

## Returns

```
number
```

[`libs/@shumoku/core/src/libs/@shumoku/core/src/themes/tone.ts:118`](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/libs/@shumoku/core/src/themes/tone.ts#L118)
