diff --git a/docs/color-spaces.md b/docs/color-spaces.md
index 15b0afbe..0a248098 100644
--- a/docs/color-spaces.md
+++ b/docs/color-spaces.md
@@ -113,8 +113,8 @@ The CIELAB color space using the [D50 standard illuminant](https://en.wikipedia.
| Channel | Range | Description |
| ------- | --------------------- | --------------------- |
| `l` | `[0, 100]` | Lightness |
-| `a` | `[-79.167, 93.408]`≈ | Green–red component |
-| `b` | `[-111.859, 93.246]`≈ | Blue–yellow component |
+| `a` | `[-79.287, 93.55]`≈ | Green–red component |
+| `b` | `[-112.029, 93.388]`≈ | Blue–yellow component |
#### `lch`
@@ -123,7 +123,7 @@ The CIELCh color space using the D50 standard illuminant.
| Channel | Range | Description |
| ------- | --------------- | ----------- |
| `l` | `[0, 100]` | Lightness |
-| `c` | `[0, 131.008]`≈ | Chroma |
+| `c` | `[0, 131.207]`≈ | Chroma |
| `h` | `[0, 360)` | Hue |
#### `lab65`
@@ -161,15 +161,15 @@ let deltaE_uv = culori.colorDifferenceEuclidean('luv');
| Channel | Range | Description |
| ------- | --------------------- | --------------------- |
| `l` | `[0, 100]` | Lightness |
-| `u` | `[-84.86, 174.87]`≈ | Green–red component |
-| `v` | `[-125.744, 87.165]`≈ | Blue–yellow component |
+| `u` | `[-84.936, 175.042]`≈ | Green–red component |
+| `v` | `[-125.882, 87.243]`≈ | Blue–yellow component |
#### `lchuv`
| Channel | Range | Description |
| ------- | --------------- | ----------- |
| `l` | `[0, 100]` | Lightness |
-| `c` | `[0, 176.609]`≈ | Chroma |
+| `c` | `[0, 176.956]`≈ | Chroma |
| `h` | `[0, 360)` | Hue |
### DIN99 Lab / LCh
@@ -182,11 +182,11 @@ The [DIN99][din99o] color space "squishes" the CIELAB D65 color space to obtain
The DIN99o color space in Cartesian form.
-| Channel | Range | Description |
-| ------- | ------------------- | ----------- |
-| `l` | `[0, 100]` | Lightness |
-| `a` | `[-40.09, 45.5]`≈ |
-| `b` | `[-40.47, 44.344]`≈ |
+| Channel | Range | Description |
+| ------- | -------------------- | ----------- |
+| `l` | `[0, 100]` | Lightness |
+| `a` | `[-40.09, 45.501]`≈ |
+| `b` | `[-40.469, 44.344]`≈ |
#### `dlch`
@@ -234,8 +234,8 @@ The Jzazbz color space in Cartesian form.
| Channel | Range | Description |
| ------- | ------------------ | --------------------- |
-| `j` | `[0, 0.221]`≈ | Lightness |
-| `a` | `[-0.108, 0.129]`≈ | Green–red component |
+| `j` | `[0, 0.222]`≈ | Lightness |
+| `a` | `[-0.109, 0.129]`≈ | Green–red component |
| `b` | `[-0.185, 0.134]`≈ | Blue–yellow component |
#### `jch`
@@ -244,7 +244,7 @@ The Jzazbz color space in cylindrical form.
| Channel | Range | Description |
| ------- | ------------- | ----------- |
-| `j` | `[0, 0.221]`≈ | Lightness |
+| `j` | `[0, 0.222]`≈ | Lightness |
| `c` | `[0, 0.190]`≈ | Chroma |
| `h` | `[0, 360)` | Hue |
@@ -255,8 +255,8 @@ The Jzazbz color space in cylindrical form.
| Channel | Range | Description |
| ------- | ------------------ | ------------------------------ |
| Y | `[0, 1]` | Luma |
-| I | `[-0.593, 0.593]`≈ | In-phase (orange-blue axis) |
-| Q | `[-0.520, 0.520]`≈ | Quadrature (green-purple axis) |
+| I | `[-0.595, 0.595]`≈ | In-phase (orange-blue axis) |
+| Q | `[-0.522, 0.522]`≈ | Quadrature (green-purple axis) |
### CIE XYZ
@@ -268,9 +268,9 @@ The CIE XYZ color space in respect to the D50 standard illuminant.
| Channel | Range | Description |
| ------- | ------------- | ----------- |
-| X | `[0, 0.962]`≈ | ? |
-| Y | `[0, 0.997]`≈ | ? |
-| Z | `[0, 0.823]`≈ | ? |
+| X | `[0, 0.964]`≈ | ? |
+| Y | `[0, 0.999]`≈ | ? |
+| Z | `[0, 0.825]`≈ | ? |
#### `xyz65`
@@ -278,9 +278,9 @@ The CIE XYZ color space in respect to the D65 standard illuminant.
| Channel | Range | Description |
| ------- | ------------- | ----------- |
-| X | `[0, 0.946]`≈ | ? |
-| Y | `[0, 0.995]`≈ | ? |
-| Z | `[0, 1.083]`≈ | ? |
+| X | `[0, 0.950]`≈ | ? |
+| Y | `[0, 1]`≈ | ? |
+| Z | `[0, 1.088]`≈ | ? |
### Cubehelix
@@ -294,11 +294,11 @@ It was expanded into a cylindrical color space by [Mike Bostock](https://en.wiki
The channels in the `cubehelix` color space maintain the conventions from D3, namely:
-| Channel | Range | Description |
-| ------- | ------------- | ------------------------------------------------------------------------ |
-| `h` | `[0, 360)` | Hue (Based on _start color_ and _rotations_ as defined in Green's paper) |
-| `s` | `[0, 4.6143]` | Saturation (Called _hue_ in op. cit.) |
-| `l` | `[0, 1]` | Lightness |
+| Channel | Range | Description |
+| ------- | ------------ | ------------------------------------------------------------------------ |
+| `h` | `[0, 360)` | Hue (Based on _start color_ and _rotations_ as defined in Green's paper) |
+| `s` | `[0, 4.614]` | Saturation (Called _hue_ in op. cit.) |
+| `l` | `[0, 1]` | Lightness |
[din99o]: https://de.wikipedia.org/wiki/DIN99-Farbraum
[yiq]: https://en.wikipedia.org/wiki/YIQ
diff --git a/src/cubehelix/definition.js b/src/cubehelix/definition.js
index bf965fc9..e7259536 100644
--- a/src/cubehelix/definition.js
+++ b/src/cubehelix/definition.js
@@ -45,7 +45,8 @@ const definition = {
ranges: {
h: [0, 360],
- s: [0, 4.6143]
+ s: [0, 4.614],
+ l: [0, 1]
},
input: {
diff --git a/src/dlab/definition.js b/src/dlab/definition.js
index e59b97e8..cd9e8add 100644
--- a/src/dlab/definition.js
+++ b/src/dlab/definition.js
@@ -22,8 +22,8 @@ const definition = {
ranges: {
l: [0, 100],
- a: [-40.09, 45.5],
- b: [-40.47, 44.344]
+ a: [-40.09, 45.501],
+ b: [-40.469, 44.344]
},
interpolate: {
diff --git a/src/jab/definition.js b/src/jab/definition.js
index 88defa44..e7c2d747 100644
--- a/src/jab/definition.js
+++ b/src/jab/definition.js
@@ -34,8 +34,8 @@ const definition = {
},
ranges: {
- j: [0, 0.221],
- a: [-0.108, 0.129],
+ j: [0, 0.222],
+ a: [-0.109, 0.129],
b: [-0.185, 0.134]
},
diff --git a/src/lab/definition.js b/src/lab/definition.js
index 5a177678..3c65cda9 100644
--- a/src/lab/definition.js
+++ b/src/lab/definition.js
@@ -24,8 +24,8 @@ const definition = {
ranges: {
l: [0, 100],
- a: [-79.167, 93.408],
- b: [-111.859, 93.246]
+ a: [-79.287, 93.55],
+ b: [-112.029, 93.388]
},
parsers: [parseLab],
diff --git a/src/lab65/definition.js b/src/lab65/definition.js
index b7c80ab1..c7e3e29d 100644
--- a/src/lab65/definition.js
+++ b/src/lab65/definition.js
@@ -21,8 +21,8 @@ const definition = {
ranges: {
l: [0, 100],
- a: [-86.183, 98.234],
- b: [-107.86, 94.478]
+ a: [-86.182, 98.234],
+ b: [-107.86, 94.477]
},
parsers: []
diff --git a/src/lch/definition.js b/src/lch/definition.js
index a835bb07..49c35ca9 100644
--- a/src/lch/definition.js
+++ b/src/lch/definition.js
@@ -27,7 +27,7 @@ const definition = {
ranges: {
l: [0, 100],
- c: [0, 131.008],
+ c: [0, 131.207],
h: [0, 360]
},
diff --git a/src/lchuv/definition.js b/src/lchuv/definition.js
index 8ff5b767..4c3477d1 100644
--- a/src/lchuv/definition.js
+++ b/src/lchuv/definition.js
@@ -34,7 +34,7 @@ const definition = {
ranges: {
l: [0, 100],
- c: [0, 131.008],
+ c: [0, 176.956],
h: [0, 360]
},
diff --git a/src/luv/definition.js b/src/luv/definition.js
index 404fe162..a0b4c55c 100644
--- a/src/luv/definition.js
+++ b/src/luv/definition.js
@@ -31,8 +31,8 @@ const definition = {
ranges: {
l: [0, 100],
- u: [-84.86, 174.87],
- v: [-125.744, 87.165]
+ u: [-84.936, 175.042],
+ v: [-125.882, 87.243]
},
interpolate: {
diff --git a/src/xyz/definition.js b/src/xyz/definition.js
index f8dcfeda..4da8feff 100644
--- a/src/xyz/definition.js
+++ b/src/xyz/definition.js
@@ -27,9 +27,9 @@ const definition = {
channels: ['x', 'y', 'z', 'alpha'],
ranges: {
- x: [0, 0.962],
- y: [0, 0.997],
- z: [0, 0.823]
+ x: [0, 0.964],
+ y: [0, 0.999],
+ z: [0, 0.825]
},
interpolate: {
diff --git a/src/xyz65/definition.js b/src/xyz65/definition.js
index c91f0c94..ae1bede9 100644
--- a/src/xyz65/definition.js
+++ b/src/xyz65/definition.js
@@ -27,9 +27,9 @@ const definition = {
},
ranges: {
- x: [0, 0.946],
- y: [0, 0.995],
- z: [0, 1.083]
+ x: [0, 0.95],
+ y: [0, 1],
+ z: [0, 1.088]
},
channels: ['x', 'y', 'z', 'alpha'],
diff --git a/src/yiq/definition.js b/src/yiq/definition.js
index 31605f52..e4346e24 100644
--- a/src/yiq/definition.js
+++ b/src/yiq/definition.js
@@ -37,8 +37,8 @@ const definition = {
channels: ['y', 'i', 'q', 'alpha'],
ranges: {
- i: [-0.593, 0.593],
- q: [-0.52, 0.52]
+ i: [-0.595, 0.595],
+ q: [-0.522, 0.522]
},
interpolate: {
diff --git a/tools/ranges.js b/tools/ranges.js
index 83b8824b..89b9b422 100644
--- a/tools/ranges.js
+++ b/tools/ranges.js
@@ -12,17 +12,18 @@ let ranges = (mode, step = 0.01) => {
(acc, ch) => ((acc[ch] = [Infinity, -Infinity]), acc),
{}
);
- let r, g, b, c;
+ let r, g, b, c, v;
for (r = 0; r <= 1; r += step) {
for (g = 0; g <= 1; g += step) {
for (b = 0; b <= 1; b += step) {
c = conv({ mode: 'rgb', r, g, b });
chs.forEach(ch => {
- if (c[ch] < res[ch][0]) {
- res[ch][0] = c[ch];
+ v = c[ch];
+ if (v < res[ch][0]) {
+ res[ch][0] = v;
}
- if (c[ch] > res[ch][1]) {
- res[ch][1] = c[ch];
+ if (v > res[ch][1]) {
+ res[ch][1] = v;
}
});
}
@@ -31,4 +32,4 @@ let ranges = (mode, step = 0.01) => {
return res;
};
-console.log(ranges('oklch', 0.0025));
+console.log(ranges(process.argv[2], 0.0025));