@thi.ng/color 5.7.23 → 5.7.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/README.md +3 -2
- package/api.d.ts +2 -2
- package/clamp.d.ts +4 -4
- package/cosine-gradients.d.ts +3 -4
- package/css/css.d.ts +2 -2
- package/css/parse-css.d.ts +1 -1
- package/distance.d.ts +4 -1
- package/gradients.d.ts +2 -3
- package/hcy/hcy.d.ts +1 -1
- package/hsi/hsi.d.ts +1 -1
- package/hsl/hsl.d.ts +1 -1
- package/hsv/hsv.d.ts +1 -1
- package/lab/lab-css.d.ts +6 -3
- package/lch/lch-css.d.ts +6 -3
- package/lch/lch.d.ts +1 -1
- package/mix.d.ts +4 -4
- package/oklab/oklab-css.d.ts +6 -3
- package/oklch/oklch-css.d.ts +1 -0
- package/oklch/oklch-oklab.d.ts +1 -1
- package/oklch/oklch.d.ts +1 -1
- package/package.json +17 -17
- package/rgb/kelvin-rgba.d.ts +1 -0
- package/rotate.d.ts +1 -1
- package/transform.d.ts +2 -2
- package/xyy/xyy-xyz.d.ts +2 -2
- package/xyz/xyz-xyy.d.ts +2 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 202 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
|
@@ -715,7 +715,7 @@ Note: @thi.ng/api is in _most_ cases a type-only import (not used at runtime)
|
|
|
715
715
|
|
|
716
716
|
## Usage examples
|
|
717
717
|
|
|
718
|
-
|
|
718
|
+
28 projects in this repo's
|
|
719
719
|
[/examples](https://github.com/thi-ng/umbrella/tree/develop/examples)
|
|
720
720
|
directory are using this package:
|
|
721
721
|
|
|
@@ -746,6 +746,7 @@ directory are using this package:
|
|
|
746
746
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/simd-plot.png" width="240"/> | Fitting, transforming & plotting 10k data points per frame using SIMD | [Demo](https://demo.thi.ng/umbrella/simd-plot/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/simd-plot) |
|
|
747
747
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/stacked-layout.png" width="240"/> | Responsive & reactively computed stacked column layout | [Demo](https://demo.thi.ng/umbrella/stacked-layout/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/stacked-layout) |
|
|
748
748
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/trace-bitmap.jpg" width="240"/> | Multi-layer vectorization & dithering of bitmap images | [Demo](https://demo.thi.ng/umbrella/trace-bitmap/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/trace-bitmap) |
|
|
749
|
+
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/tsne-colors.avif" width="240"/> | Animated t-SNE visualization of 4D data | [Demo](https://demo.thi.ng/umbrella/tsne-colors/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/tsne-colors) |
|
|
749
750
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/viz-ridge-lines.avif" width="240"/> | Interactive ridge-line plot | [Demo](https://demo.thi.ng/umbrella/viz-ridge-lines/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/viz-ridge-lines) |
|
|
750
751
|
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/webgl-texture-paint.jpg" width="240"/> | Interactively drawing to & reading from a WebGL offscreen render texture | [Demo](https://demo.thi.ng/umbrella/webgl-texture-paint/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/webgl-texture-paint) |
|
|
751
752
|
|
package/api.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export interface ChannelSpec {
|
|
|
42
42
|
* color spaces to be slightly outside that sRGB gamut. These are soft
|
|
43
43
|
* limits, for orientation only.
|
|
44
44
|
*
|
|
45
|
-
* @defaultValue [0,1]
|
|
45
|
+
* @defaultValue `[0,1]`
|
|
46
46
|
*/
|
|
47
47
|
range?: Range;
|
|
48
48
|
/**
|
|
@@ -161,7 +161,7 @@ export interface TypedColor<T> extends IColor, IDeref<Color>, IEqualsDelta<T>, I
|
|
|
161
161
|
clamp(): this;
|
|
162
162
|
/**
|
|
163
163
|
* Randomizes all color channels based on channel ranges defined for this
|
|
164
|
-
* color type (usually [0
|
|
164
|
+
* color type (usually `[0,1]` interval). Alpha channel will remain
|
|
165
165
|
* untouched.
|
|
166
166
|
*
|
|
167
167
|
* @param rnd -
|
package/clamp.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Color, ReadonlyColor } from "./api.js";
|
|
2
2
|
/**
|
|
3
|
-
* Clamps all color channels to [0,1] interval and calls `ensureAlpha` to
|
|
4
|
-
* alpha channel is defined (if missing sets it to `alpha`, default: 1).
|
|
3
|
+
* Clamps all color channels to `[0,1]` interval and calls `ensureAlpha` to
|
|
4
|
+
* ensure alpha channel is defined (if missing sets it to `alpha`, default: 1).
|
|
5
5
|
*
|
|
6
6
|
* @remarks
|
|
7
7
|
* If `out` is null, the resulting color will be written back into `src`.
|
|
@@ -17,8 +17,8 @@ import type { Color, ReadonlyColor } from "./api.js";
|
|
|
17
17
|
*/
|
|
18
18
|
export declare const clamp: (out: Color | null, src: ReadonlyColor, alpha?: number) => import("@thi.ng/vectors").Vec;
|
|
19
19
|
/**
|
|
20
|
-
* Similar to {@link clamp}, but calls `ensureHue` to fold (instead of
|
|
21
|
-
*
|
|
20
|
+
* Similar to {@link clamp}, but calls `ensureHue` to fold (instead of clamping)
|
|
21
|
+
* the hue into the `[0,1]` interval.
|
|
22
22
|
*
|
|
23
23
|
* @remarks
|
|
24
24
|
* If `out` is null, the resulting color will be written back into `src`.
|
package/cosine-gradients.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import type { CosGradientSpec, CosineGradientOpts, CosineGradientPreset } from "
|
|
|
13
13
|
export declare const COSINE_GRADIENTS: Record<CosineGradientPreset, CosGradientSpec>;
|
|
14
14
|
/**
|
|
15
15
|
* Computes a single linear RGBA color for given gradient spec and normalized
|
|
16
|
-
* position `t` (in [0
|
|
16
|
+
* position `t` (in `[0,1]` interval).
|
|
17
17
|
*
|
|
18
18
|
* @param spec -
|
|
19
19
|
* @param t -
|
|
@@ -39,7 +39,7 @@ export declare const cosineGradient: (n: number, spec: CosGradientSpec, tx?: FnU
|
|
|
39
39
|
*
|
|
40
40
|
* @remarks
|
|
41
41
|
* Intended use case for this function: 1D texturemap/tonemap generation, e.g.
|
|
42
|
-
* for dataviz etc. Also
|
|
42
|
+
* for dataviz etc. Also see {@link multiColorGradientBuffer}.
|
|
43
43
|
*
|
|
44
44
|
* @param n - number of colors
|
|
45
45
|
* @param spec - gradient spec
|
|
@@ -62,8 +62,7 @@ export declare const cosineCoeffs: FnU2<ReadonlyColor, CosGradientSpec>;
|
|
|
62
62
|
* an array of `n+1` linear RGBA color samples.
|
|
63
63
|
*
|
|
64
64
|
* @remarks
|
|
65
|
-
* See
|
|
66
|
-
* [`tween()`](https://docs.thi.ng/umbrella/transducers/functions/tween.html)
|
|
65
|
+
* See [`tween`](https://docs.thi.ng/umbrella/transducers/functions/tween.html)
|
|
67
66
|
*
|
|
68
67
|
* @example
|
|
69
68
|
* ```ts tangle:../export/cosine-gradient.ts
|
package/css/css.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type CSSConversions = Partial<Record<ColorMode, Fn<any, string>>>;
|
|
|
9
9
|
* {@link setDefaultCSSConversions} to change default.
|
|
10
10
|
*
|
|
11
11
|
* Reference:
|
|
12
|
-
*
|
|
12
|
+
* https://www.w3.org/TR/css-color-3/
|
|
13
13
|
*/
|
|
14
14
|
export declare const CSS_LEVEL3: CSSConversions;
|
|
15
15
|
/**
|
|
@@ -20,7 +20,7 @@ export declare const CSS_LEVEL3: CSSConversions;
|
|
|
20
20
|
* Use {@link setDefaultCSSConversions} to use as default.
|
|
21
21
|
*
|
|
22
22
|
* Reference:
|
|
23
|
-
*
|
|
23
|
+
* https://www.w3.org/TR/css-color-4/
|
|
24
24
|
*/
|
|
25
25
|
export declare const CSS_LEVEL4: CSSConversions;
|
|
26
26
|
/**
|
package/css/parse-css.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { type IParsedColor } from "../api.js";
|
|
|
9
9
|
* The following syntax versions are supported:
|
|
10
10
|
*
|
|
11
11
|
* - CSS named colors
|
|
12
|
-
* - CSS system colors
|
|
12
|
+
* - CSS system colors, see {@link CSS_SYSTEM_COLORS}
|
|
13
13
|
* - hex3/4/6/8
|
|
14
14
|
* - `rgb(r% g% b% / a%?)`
|
|
15
15
|
* - `rgb(r g b / a?)`
|
package/distance.d.ts
CHANGED
|
@@ -21,7 +21,8 @@ export declare const distHsv: ColorDistance;
|
|
|
21
21
|
* a cyclinder (using Law of Cosines).
|
|
22
22
|
*
|
|
23
23
|
* @remarks
|
|
24
|
-
*
|
|
24
|
+
* References:
|
|
25
|
+
*
|
|
25
26
|
* - https://math.stackexchange.com/a/3612602
|
|
26
27
|
* - https://en.wikipedia.org/wiki/Law_of_cosines
|
|
27
28
|
*
|
|
@@ -90,6 +91,7 @@ export declare const distRgbBlue: ColorDistance;
|
|
|
90
91
|
*
|
|
91
92
|
* @remarks
|
|
92
93
|
* References:
|
|
94
|
+
*
|
|
93
95
|
* - https://en.wikipedia.org/wiki/Color_difference#CIEDE2000
|
|
94
96
|
* - http://www2.ece.rochester.edu/~gsharma/ciede2000/ciede2000noteCRNA.pdf
|
|
95
97
|
*
|
|
@@ -109,6 +111,7 @@ export declare const distCIEDE2000: (weights?: ReadonlyVec) => ColorDistance;
|
|
|
109
111
|
* `distCMC(a, b) !== distCMC(b, a)`
|
|
110
112
|
*
|
|
111
113
|
* References:
|
|
114
|
+
*
|
|
112
115
|
* - https://en.wikipedia.org/wiki/Color_difference#CMC_l:c_(1984)
|
|
113
116
|
*/
|
|
114
117
|
export declare const distCMC: (kl?: number, kc?: number) => ColorDistance;
|
package/gradients.d.ts
CHANGED
|
@@ -9,8 +9,7 @@ import type { GradientOpts } from "./api/gradients.js";
|
|
|
9
9
|
* array of numbers will be returned.
|
|
10
10
|
*
|
|
11
11
|
* @remarks
|
|
12
|
-
* See
|
|
13
|
-
* [`tween()`](https://docs.thi.ng/umbrella/transducers/functions/tween.html)
|
|
12
|
+
* See [`tween`](https://docs.thi.ng/umbrella/transducers/functions/tween.html)
|
|
14
13
|
*
|
|
15
14
|
* @example
|
|
16
15
|
* ```ts tangle:../export/multi-color-gradient.ts
|
|
@@ -56,7 +55,7 @@ export declare function multiColorGradient<T extends TypedColor<any>>(opts: Grad
|
|
|
56
55
|
*
|
|
57
56
|
* @remarks
|
|
58
57
|
* Intended use case for this function: 1D texturemap/tonemap generation, e.g.
|
|
59
|
-
* for dataviz etc. Also
|
|
58
|
+
* for dataviz etc. Also see {@link cosineGradientBuffer}.
|
|
60
59
|
*
|
|
61
60
|
* @param opts -
|
|
62
61
|
* @param buffer - target buffer/array
|
package/hcy/hcy.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export declare class HCY implements TypedColor<HCY> {
|
|
|
28
28
|
/**
|
|
29
29
|
* @remarks
|
|
30
30
|
* Note: As with other hue-based color modes in this package, the hue is stored
|
|
31
|
-
* normalized (in [0
|
|
31
|
+
* normalized (in `[0,1]` interval) and NOT as degrees.
|
|
32
32
|
*/
|
|
33
33
|
export declare const hcy: ColorFactory<HCY>;
|
|
34
34
|
//# sourceMappingURL=hcy.d.ts.map
|
package/hsi/hsi.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export declare class HSI implements TypedColor<HSI> {
|
|
|
28
28
|
/**
|
|
29
29
|
* @remarks
|
|
30
30
|
* Note: As with other hue-based color modes in this package, the hue is stored
|
|
31
|
-
* normalized (in [0
|
|
31
|
+
* normalized (in `[0,1]` interval) and NOT as degrees.
|
|
32
32
|
*/
|
|
33
33
|
export declare const hsi: ColorFactory<HSI>;
|
|
34
34
|
//# sourceMappingURL=hsi.d.ts.map
|
package/hsl/hsl.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export declare class HSL implements TypedColor<HSL> {
|
|
|
28
28
|
/**
|
|
29
29
|
* @remarks
|
|
30
30
|
* Note: As with other hue-based color modes in this package, the hue is stored
|
|
31
|
-
* normalized (in [0
|
|
31
|
+
* normalized (in `[0,1]` interval) and NOT as degrees.
|
|
32
32
|
*/
|
|
33
33
|
export declare const hsl: ColorFactory<HSL>;
|
|
34
34
|
//# sourceMappingURL=hsl.d.ts.map
|
package/hsv/hsv.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export declare class HSV implements TypedColor<HSV> {
|
|
|
28
28
|
/**
|
|
29
29
|
* @remarks
|
|
30
30
|
* Note: As with other hue-based color modes in this package, the hue is stored
|
|
31
|
-
* normalized (in [0
|
|
31
|
+
* normalized (in `[0,1]` interval) and NOT as degrees.
|
|
32
32
|
*/
|
|
33
33
|
export declare const hsv: ColorFactory<HSV>;
|
|
34
34
|
//# sourceMappingURL=hsv.d.ts.map
|
package/lab/lab-css.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { ReadonlyColor } from "../api.js";
|
|
2
2
|
/**
|
|
3
3
|
* @remarks
|
|
4
|
-
* Only supported in CSS Color Level 4 onwards
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Only supported in CSS Color Level 4 onwards.
|
|
5
|
+
*
|
|
6
|
+
* References:
|
|
7
|
+
*
|
|
8
|
+
* - https://www.w3.org/TR/css-color-4/#specifying-lab-lch
|
|
9
|
+
* - https://test.csswg.org/harness/results/css-color-4_dev/grouped/ (test reports)
|
|
7
10
|
*
|
|
8
11
|
* @param src -
|
|
9
12
|
*/
|
package/lch/lch-css.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { ReadonlyColor } from "../api.js";
|
|
2
2
|
/**
|
|
3
3
|
* @remarks
|
|
4
|
-
* Only supported in CSS Color Level 4 onwards
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Only supported in CSS Color Level 4 onwards.
|
|
5
|
+
*
|
|
6
|
+
* References:
|
|
7
|
+
*
|
|
8
|
+
* - https://www.w3.org/TR/css-color-4/#specifying-lab-lch
|
|
9
|
+
* - https://test.csswg.org/harness/results/css-color-4_dev/grouped/ (test reports)
|
|
7
10
|
*
|
|
8
11
|
* @param src -
|
|
9
12
|
*/
|
package/lch/lch.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare class LCH implements TypedColor<LCH> {
|
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
33
|
* Note: As with other hue-based color modes in this package, the hue is stored
|
|
34
|
-
* normalized (in [0
|
|
34
|
+
* normalized (in `[0,1]` interval) and NOT as degrees.
|
|
35
35
|
*/
|
|
36
36
|
export declare const lch: ColorFactory<LCH>;
|
|
37
37
|
//# sourceMappingURL=lch.d.ts.map
|
package/mix.d.ts
CHANGED
|
@@ -14,8 +14,8 @@ export declare const defMix: FnU4<FnN3, ColorMixFn>;
|
|
|
14
14
|
* Single channel interpolation for (normalized) hues. Always interpolates via
|
|
15
15
|
* smallest angle difference, i.e. such that the effective `abs(a-b) <= 0.5`.
|
|
16
16
|
*
|
|
17
|
-
* @param a - start hue in [0,1) interval
|
|
18
|
-
* @param b - end hue in [0,1) interval
|
|
17
|
+
* @param a - start hue in `[0,1)` interval
|
|
18
|
+
* @param b - end hue in `[0,1)` interval
|
|
19
19
|
* @param t - interpolation factor
|
|
20
20
|
*/
|
|
21
21
|
export declare const mixH: FnN3;
|
|
@@ -30,7 +30,7 @@ export declare const mixN: FnN3;
|
|
|
30
30
|
export declare const mixHNNN: ColorMixFn;
|
|
31
31
|
export declare const mixNNHN: ColorMixFn;
|
|
32
32
|
/**
|
|
33
|
-
* Channelwise linear interpolation between colors `a` and `b` using `t` [0
|
|
33
|
+
* Channelwise linear interpolation between colors `a` and `b` using `t` `[0,1]`
|
|
34
34
|
* as blend factor.
|
|
35
35
|
*
|
|
36
36
|
* @param out -
|
|
@@ -41,7 +41,7 @@ export declare const mixNNHN: ColorMixFn;
|
|
|
41
41
|
export declare const mixNNNN: ColorMixFn;
|
|
42
42
|
/**
|
|
43
43
|
* Channelwise and {@link ColorMode}-aware interpolation between colors `a` and
|
|
44
|
-
* `b` using `t` [0
|
|
44
|
+
* `b` using `t` `[0,1]` as blend factor. `a` and `b` MUST be of same color
|
|
45
45
|
* type.
|
|
46
46
|
*
|
|
47
47
|
* @remarks
|
package/oklab/oklab-css.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { ReadonlyColor } from "../api.js";
|
|
2
2
|
/**
|
|
3
3
|
* @remarks
|
|
4
|
-
* Only supported in CSS Color Level 4 onwards
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Only supported in CSS Color Level 4 onwards.
|
|
5
|
+
*
|
|
6
|
+
* References:
|
|
7
|
+
*
|
|
8
|
+
* - https://www.w3.org/TR/css-color-4/#specifying-lab-lch
|
|
9
|
+
* - https://test.csswg.org/harness/results/css-color-4_dev/grouped/ (test reports)
|
|
7
10
|
*
|
|
8
11
|
* @param src -
|
|
9
12
|
*/
|
package/oklch/oklch-css.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { ReadonlyColor } from "../api.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* @remarks
|
|
4
4
|
* Only supported in CSS Color Level 4 onwards
|
|
5
|
+
*
|
|
5
6
|
* - https://www.w3.org/TR/css-color-4/#specifying-oklab-oklch
|
|
6
7
|
* - https://test.csswg.org/harness/results/css-color-4_dev/grouped/ (test reports)
|
|
7
8
|
*
|
package/oklch/oklch-oklab.d.ts
CHANGED
package/oklch/oklch.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export declare class Oklch implements TypedColor<Oklch> {
|
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* Note: As with other hue-based color modes in this package, the hue is stored
|
|
33
|
-
* normalized (in [0
|
|
33
|
+
* normalized (in `[0,1]` interval) and NOT as degrees.
|
|
34
34
|
*
|
|
35
35
|
* Reference: https://bottosson.github.io/posts/oklab/
|
|
36
36
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/color",
|
|
3
|
-
"version": "5.7.
|
|
3
|
+
"version": "5.7.25",
|
|
4
4
|
"description": "Array-based color types, CSS parsing, conversions, transformations, declarative theme generation, gradients, presets",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -43,23 +43,23 @@
|
|
|
43
43
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@thi.ng/api": "^8.11.
|
|
47
|
-
"@thi.ng/arrays": "^2.10.
|
|
48
|
-
"@thi.ng/binary": "^3.4.
|
|
49
|
-
"@thi.ng/checks": "^3.6.
|
|
50
|
-
"@thi.ng/compare": "^2.4.
|
|
51
|
-
"@thi.ng/compose": "^3.0.
|
|
52
|
-
"@thi.ng/defmulti": "^3.0.
|
|
53
|
-
"@thi.ng/errors": "^2.5.
|
|
54
|
-
"@thi.ng/math": "^5.11.
|
|
55
|
-
"@thi.ng/random": "^4.1.
|
|
56
|
-
"@thi.ng/strings": "^3.9.
|
|
57
|
-
"@thi.ng/transducers": "^9.2.
|
|
58
|
-
"@thi.ng/vectors": "^7.12.
|
|
46
|
+
"@thi.ng/api": "^8.11.21",
|
|
47
|
+
"@thi.ng/arrays": "^2.10.16",
|
|
48
|
+
"@thi.ng/binary": "^3.4.44",
|
|
49
|
+
"@thi.ng/checks": "^3.6.24",
|
|
50
|
+
"@thi.ng/compare": "^2.4.13",
|
|
51
|
+
"@thi.ng/compose": "^3.0.24",
|
|
52
|
+
"@thi.ng/defmulti": "^3.0.61",
|
|
53
|
+
"@thi.ng/errors": "^2.5.27",
|
|
54
|
+
"@thi.ng/math": "^5.11.21",
|
|
55
|
+
"@thi.ng/random": "^4.1.12",
|
|
56
|
+
"@thi.ng/strings": "^3.9.6",
|
|
57
|
+
"@thi.ng/transducers": "^9.2.19",
|
|
58
|
+
"@thi.ng/vectors": "^7.12.21"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"esbuild": "^0.
|
|
62
|
-
"typedoc": "^0.27.
|
|
61
|
+
"esbuild": "^0.25.0",
|
|
62
|
+
"typedoc": "^0.27.7",
|
|
63
63
|
"typescript": "^5.7.3"
|
|
64
64
|
},
|
|
65
65
|
"keywords": [
|
|
@@ -446,5 +446,5 @@
|
|
|
446
446
|
"vectors"
|
|
447
447
|
]
|
|
448
448
|
},
|
|
449
|
-
"gitHead": "
|
|
449
|
+
"gitHead": "bee617702ac61d093465b967f8f973dc566faa6b\n"
|
|
450
450
|
}
|
package/rgb/kelvin-rgba.d.ts
CHANGED
package/rotate.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { Color, TypedColor } from "./api.js";
|
|
|
7
7
|
* If `out` is null, the resulting will be written back into `src`.
|
|
8
8
|
*
|
|
9
9
|
* As with all hue-based color modes in this package, the hue is stored
|
|
10
|
-
* normalized (in [0
|
|
10
|
+
* normalized (in `[0,1]` interval) and NOT as degrees. The same goes for the
|
|
11
11
|
* rotation angle `theta`.
|
|
12
12
|
*
|
|
13
13
|
* Only supported for hue based color modes:
|
package/transform.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type { ColorMatrix, ReadonlyColor } from "./api.js";
|
|
|
8
8
|
* @param out - result
|
|
9
9
|
* @param mat - transform matrix
|
|
10
10
|
* @param src - source color
|
|
11
|
-
* @param clampOut - true, if result should be clamped to [0
|
|
11
|
+
* @param clampOut - true, if result should be clamped to `[0,1]`
|
|
12
12
|
*/
|
|
13
13
|
export declare const transform: (out: import("./api.js").Color | null, mat: ColorMatrix, src: ReadonlyColor, clampOut?: boolean) => import("@thi.ng/vectors").Vec;
|
|
14
14
|
/**
|
|
@@ -53,7 +53,7 @@ export declare const saturationMat: (x: number) => ColorMatrix;
|
|
|
53
53
|
export declare const hueRotateMat: (theta: number) => ColorMatrix;
|
|
54
54
|
/**
|
|
55
55
|
* Color temperature adjustment matrix. `x` controls blue/yellow, `y` controls
|
|
56
|
-
* green/magenta axis (both params in [-1,1] range).
|
|
56
|
+
* green/magenta axis (both params in `[-1,1]` range).
|
|
57
57
|
*
|
|
58
58
|
* @param x
|
|
59
59
|
* @param y
|
package/xyy/xyy-xyz.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ColorOp } from "../api.js";
|
|
2
2
|
/**
|
|
3
3
|
* @remarks
|
|
4
|
-
* https://en.wikipedia.org/wiki/CIE_1931_color_space#CIE_xy_chromaticity_diagram_and_the_CIE_xyY_color_space
|
|
5
|
-
* https://gamedev.stackexchange.com/a/70049
|
|
4
|
+
* - https://en.wikipedia.org/wiki/CIE_1931_color_space#CIE_xy_chromaticity_diagram_and_the_CIE_xyY_color_space
|
|
5
|
+
* - https://gamedev.stackexchange.com/a/70049
|
|
6
6
|
*
|
|
7
7
|
* @param out -
|
|
8
8
|
* @param src -
|
package/xyz/xyz-xyy.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ColorOp } from "../api.js";
|
|
2
2
|
/**
|
|
3
3
|
* @remarks
|
|
4
|
-
* https://en.wikipedia.org/wiki/CIE_1931_color_space#CIE_xy_chromaticity_diagram_and_the_CIE_xyY_color_space
|
|
5
|
-
* https://gamedev.stackexchange.com/a/70049
|
|
4
|
+
* - https://en.wikipedia.org/wiki/CIE_1931_color_space#CIE_xy_chromaticity_diagram_and_the_CIE_xyY_color_space
|
|
5
|
+
* - https://gamedev.stackexchange.com/a/70049
|
|
6
6
|
*
|
|
7
7
|
* @param out -
|
|
8
8
|
* @param src -
|