@thi.ng/color 5.4.4 → 5.4.6
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 +1 -1
- package/color-range.d.ts +1 -1
- package/color-range.js +2 -2
- package/css/parse-css.d.ts +1 -1
- package/distance.d.ts +6 -6
- package/mix.d.ts +2 -2
- package/package.json +20 -20
- package/rgb/kelvin-rgba.d.ts +1 -1
- package/strategies.d.ts +1 -1
- package/xyz/wavelength-xyz.d.ts +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -579,7 +579,7 @@ concatenation (see `concat()`) for more efficient application.
|
|
|
579
579
|
## Related packages
|
|
580
580
|
|
|
581
581
|
- [@thi.ng/pixel](https://github.com/thi-ng/umbrella/tree/develop/packages/pixel) - Typedarray integer & float pixel buffers w/ customizable formats, blitting, drawing, convolution
|
|
582
|
-
- [@thi.ng/vectors](https://github.com/thi-ng/umbrella/tree/develop/packages/vectors) - Optimized 2d/3d/4d and arbitrary length vector operations
|
|
582
|
+
- [@thi.ng/vectors](https://github.com/thi-ng/umbrella/tree/develop/packages/vectors) - Optimized 2d/3d/4d and arbitrary length vector operations, support for memory mapping/layouts
|
|
583
583
|
|
|
584
584
|
## Installation
|
|
585
585
|
|
package/color-range.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Without } from "@thi.ng/api";
|
|
2
2
|
import type { ColorRange, ColorRangeOpts, ColorRangePreset, ColorThemePart, ColorThemePartTuple } from "./api/ranges.js";
|
|
3
|
-
import { LCH } from "./lch/lch.js";
|
|
3
|
+
import { type LCH } from "./lch/lch.js";
|
|
4
4
|
/**
|
|
5
5
|
* Preset {@link ColorRange}s for use with {@link colorsFromRange},
|
|
6
6
|
* {@link colorsFromTheme} etc.
|
package/color-range.js
CHANGED
|
@@ -7,13 +7,13 @@ import { fract } from "@thi.ng/math/prec";
|
|
|
7
7
|
import { coin } from "@thi.ng/random/coin";
|
|
8
8
|
import { SYSTEM } from "@thi.ng/random/system";
|
|
9
9
|
import { weightedRandom } from "@thi.ng/random/weighted-random";
|
|
10
|
+
import { analog } from "./analog.js";
|
|
10
11
|
import { parseCss } from "./css/parse-css.js";
|
|
11
12
|
import { __ensureAlpha } from "./internal/ensure.js";
|
|
12
|
-
import { lch } from "./lch/lch.js";
|
|
13
|
-
import { analog } from "./analog.js";
|
|
14
13
|
import { isBlack } from "./is-black.js";
|
|
15
14
|
import { isGray } from "./is-gray.js";
|
|
16
15
|
import { isWhite } from "./is-white.js";
|
|
16
|
+
import { lch } from "./lch/lch.js";
|
|
17
17
|
/**
|
|
18
18
|
* Preset {@link ColorRange}s for use with {@link colorsFromRange},
|
|
19
19
|
* {@link colorsFromTheme} etc.
|
package/css/parse-css.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IDeref } from "@thi.ng/api";
|
|
2
|
-
import { IParsedColor } from "../api.js";
|
|
2
|
+
import { type IParsedColor } from "../api.js";
|
|
3
3
|
/**
|
|
4
4
|
* Attempts to parse given CSS color into an interim {@link ParsedColor} type
|
|
5
5
|
* with {@link srgb}, {@link hsl}, {@link labD50} or {@link lch} color modes.
|
package/distance.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReadonlyVec } from "@thi.ng/vectors/api";
|
|
1
|
+
import { type ReadonlyVec } from "@thi.ng/vectors/api";
|
|
2
2
|
import type { ColorDistance } from "./api.js";
|
|
3
3
|
/**
|
|
4
4
|
* Higher order function. Returns {@link ColorDistance} function for given color
|
|
@@ -35,14 +35,14 @@ export declare const distLch: ColorDistance;
|
|
|
35
35
|
* @param a -
|
|
36
36
|
* @param b -
|
|
37
37
|
*/
|
|
38
|
-
export declare const distHsvSat: ColorDistance
|
|
38
|
+
export declare const distHsvSat: ColorDistance;
|
|
39
39
|
/**
|
|
40
40
|
* Computes difference in brightness between two HSV or two HSL colors.
|
|
41
41
|
*
|
|
42
42
|
* @param a -
|
|
43
43
|
* @param b -
|
|
44
44
|
*/
|
|
45
|
-
export declare const distHsvLuma: ColorDistance
|
|
45
|
+
export declare const distHsvLuma: ColorDistance;
|
|
46
46
|
/**
|
|
47
47
|
* Computes eucledian distance between two colors. Only the first 3 color
|
|
48
48
|
* channels will be considered.
|
|
@@ -66,21 +66,21 @@ export declare const distSrgbLuma: ColorDistance;
|
|
|
66
66
|
* @param a -
|
|
67
67
|
* @param b -
|
|
68
68
|
*/
|
|
69
|
-
export declare const distRgbRed: ColorDistance
|
|
69
|
+
export declare const distRgbRed: ColorDistance;
|
|
70
70
|
/**
|
|
71
71
|
* Computes green difference between two RGB colors.
|
|
72
72
|
*
|
|
73
73
|
* @param a -
|
|
74
74
|
* @param b -
|
|
75
75
|
*/
|
|
76
|
-
export declare const distRgbGreen: ColorDistance
|
|
76
|
+
export declare const distRgbGreen: ColorDistance;
|
|
77
77
|
/**
|
|
78
78
|
* Computes blue difference between two RGB colors.
|
|
79
79
|
*
|
|
80
80
|
* @param a -
|
|
81
81
|
* @param b -
|
|
82
82
|
*/
|
|
83
|
-
export declare const distRgbBlue: ColorDistance
|
|
83
|
+
export declare const distRgbBlue: ColorDistance;
|
|
84
84
|
/**
|
|
85
85
|
* Higher order function to compute the CIEDE2000 color difference between 2
|
|
86
86
|
* colors in CIELAB space. Takes a vector of LCH weight coefficients to adjust
|
package/mix.d.ts
CHANGED
|
@@ -27,8 +27,8 @@ export declare const mixH: FnN3;
|
|
|
27
27
|
* @param t -
|
|
28
28
|
*/
|
|
29
29
|
export declare const mixN: FnN3;
|
|
30
|
-
export declare const mixHNNN: ColorMixFn
|
|
31
|
-
export declare const mixNNHN: ColorMixFn
|
|
30
|
+
export declare const mixHNNN: ColorMixFn;
|
|
31
|
+
export declare const mixNNHN: ColorMixFn;
|
|
32
32
|
/**
|
|
33
33
|
* Channelwise linear interpolation between colors `a` and `b` using `t` [0..1]
|
|
34
34
|
* as blend factor.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/color",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.6",
|
|
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",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "yarn clean && tsc --declaration",
|
|
28
|
-
"clean": "rimraf --glob '*.js' '*.d.ts' '*.map' doc api css hcy hsi hsl hsv int internal lab lch oklab rgb srgb xyy xyz ycc",
|
|
28
|
+
"clean": "rimraf --glob '*.js' '*.d.ts' '*.map' doc api css hcy hsi hsl hsv int internal lab lch oklab oklch rgb srgb xyy xyz ycc",
|
|
29
29
|
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
|
|
30
30
|
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
|
|
31
31
|
"doc:readme": "yarn doc:stats && tools:readme",
|
|
@@ -38,27 +38,27 @@
|
|
|
38
38
|
"tool:swatches": "tools:node-esm tools/index.ts"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@thi.ng/api": "^8.7.
|
|
42
|
-
"@thi.ng/arrays": "^2.5.
|
|
43
|
-
"@thi.ng/binary": "^3.3.
|
|
44
|
-
"@thi.ng/checks": "^3.3.
|
|
45
|
-
"@thi.ng/compare": "^2.1.
|
|
46
|
-
"@thi.ng/compose": "^2.1.
|
|
47
|
-
"@thi.ng/defmulti": "^2.1.
|
|
48
|
-
"@thi.ng/errors": "^2.2.
|
|
49
|
-
"@thi.ng/math": "^5.4.
|
|
50
|
-
"@thi.ng/random": "^3.3.
|
|
51
|
-
"@thi.ng/strings": "^3.4.
|
|
52
|
-
"@thi.ng/transducers": "^8.
|
|
53
|
-
"@thi.ng/vectors": "^7.6.
|
|
41
|
+
"@thi.ng/api": "^8.7.5",
|
|
42
|
+
"@thi.ng/arrays": "^2.5.9",
|
|
43
|
+
"@thi.ng/binary": "^3.3.22",
|
|
44
|
+
"@thi.ng/checks": "^3.3.11",
|
|
45
|
+
"@thi.ng/compare": "^2.1.28",
|
|
46
|
+
"@thi.ng/compose": "^2.1.30",
|
|
47
|
+
"@thi.ng/defmulti": "^2.1.34",
|
|
48
|
+
"@thi.ng/errors": "^2.2.14",
|
|
49
|
+
"@thi.ng/math": "^5.4.6",
|
|
50
|
+
"@thi.ng/random": "^3.3.28",
|
|
51
|
+
"@thi.ng/strings": "^3.4.3",
|
|
52
|
+
"@thi.ng/transducers": "^8.4.1",
|
|
53
|
+
"@thi.ng/vectors": "^7.6.10"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@microsoft/api-extractor": "^7.34.4",
|
|
57
|
-
"@thi.ng/testament": "^0.3.
|
|
58
|
-
"rimraf": "^4.4.
|
|
57
|
+
"@thi.ng/testament": "^0.3.14",
|
|
58
|
+
"rimraf": "^4.4.1",
|
|
59
59
|
"tools": "^0.0.1",
|
|
60
|
-
"typedoc": "^0.23.
|
|
61
|
-
"typescript": "^
|
|
60
|
+
"typedoc": "^0.23.28",
|
|
61
|
+
"typescript": "^5.0.2"
|
|
62
62
|
},
|
|
63
63
|
"keywords": [
|
|
64
64
|
"color",
|
|
@@ -445,5 +445,5 @@
|
|
|
445
445
|
"vectors"
|
|
446
446
|
]
|
|
447
447
|
},
|
|
448
|
-
"gitHead": "
|
|
448
|
+
"gitHead": "83b15b34326d480cbca0472b20390d4d3bbb792a\n"
|
|
449
449
|
}
|
package/rgb/kelvin-rgba.d.ts
CHANGED
package/strategies.d.ts
CHANGED
package/xyz/wavelength-xyz.d.ts
CHANGED