Skip to content

Feature/add din99c and din99d #230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: describes DIN99c/d color spaces
  • Loading branch information
rumpelrausch committed Feb 11, 2024
commit 6d998f9a60d616be688037cc15a6eb05736fd7db
45 changes: 45 additions & 0 deletions docs/color-spaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,51 @@ Serialized as `color(--din99o-lch l c h)`, with the `none` keyword for any missi

Does not have gamut limits.

### DIN99c and DIN99d

DIN99c and DIN99d are "spinoffs" of DIN99b which itself is derived from DIN99. For color distance calculation they are said to perform better than DIN99o, especially in the blue areas, and are comparable in quality to the complex CIE2000 formula.

The sole purpose of these color spaces is highly performant distance calculation, so only conversion _to_ DIN99c/d is implemented.
The models also contains chroma and hue channels as supporting information.

The color distance (deltaE) function factories are:
```js
culori.differenceEuclidean('d99c')
culori.differenceEuclidean('d99d')
```
If needed outside of culori, distance calculation is:<br>
```text
&Delta;E = SQRT( &Delta;L<sup>2</sup> + &Delta;a<sup>2</sup> + &Delta;b<sup>2</sup> )
```

#### `din99c`

DIN99c color space in cartesian and cylindrical form.

| Channel | Range | Description |
| ------- | -------------------- | ----------- |
| `l` | `[0, 100]` | Lightness |
| `a` | `[-55, 55]`≈ |
| `b` | `[-55, 55]`≈ |
| `c` | `[0, 55]`≈ | Chroma |
| `h` | `[0, 360)` | Hue |

Does not have gamut limits.

#### `din99d`

DIN99d color space in cartesian and cylindrical form.

| Channel | Range | Description |
| ------- | -------------------- | ----------- |
| `l` | `[0, 100]` | Lightness |
| `a` | `[-55, 55]`≈ |
| `b` | `[-55, 55]`≈ |
| `c` | `[0, 55]`≈ | Chroma |
| `h` | `[0, 360)` | Hue |

Does not have gamut limits.

### Oklab, Oklch, Okhsl, Okhsv

The [Oklab color space](https://bottosson.github.io/posts/oklab/), in Cartesian (Lab) and cylindrical (LCh) forms. It uses the D65 standard illuminant.
Expand Down