@thi.ng/color 5.7.3 → 5.7.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-08-20T11:41:56Z
3
+ - **Last updated**: 2024-09-16T13:25:24Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ### [5.7.4](https://github.com/thi-ng/umbrella/tree/@thi.ng/color@5.7.4) (2024-09-16)
13
+
14
+ #### 🩹 Bug fixes
15
+
16
+ - update pkg exports ([f5f733f](https://github.com/thi-ng/umbrella/commit/f5f733f))
17
+
12
18
  ## [5.7.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/color@5.7.0) (2024-08-19)
13
19
 
14
20
  #### 🚀 Features
package/README.md CHANGED
@@ -384,13 +384,15 @@ between colors. These functions can also be used for sorting color arrays (see b
384
384
  - `distCIEDE2000`
385
385
  - `distCMC`
386
386
 
387
- The `sort()` function can be used to sort an array of colors using arbitrary
388
- sort criteria (basically any function which can transform a color into a
389
- number). The following comparators are bundled:
387
+ The [`sort()`](https://docs.thi.ng/umbrella/color/functions/sort.html) function
388
+ can be used to sort an array of colors using arbitrary sort criteria (basically
389
+ any function which can transform a color into a number). The following
390
+ comparators are bundled:
390
391
 
391
- - `selectChannel(i)` - sort by channel
392
- - `proximity(target, distFn)` - sort by distance to target color using given distance function
393
- - `luminance` / `luminanceRgb` / `luminanceSrgb` etc.
392
+ - [`selectChannel(i)`](https://docs.thi.ng/umbrella/color/functions/selectChannel.html) - sort by channel
393
+ - [`proximity(target, distFn)`](https://docs.thi.ng/umbrella/color/functions/proximity.html) - sort by distance to target color using given distance function
394
+ - [`luminance`](https://docs.thi.ng/umbrella/color/functions/luminance.html) /
395
+ `luminanceRgb` / `luminanceSrgb` etc.
394
396
 
395
397
  ```ts tangle:export/readme-sort-theme.ts
396
398
  import {
@@ -419,9 +421,10 @@ sort(colors, proximity(lch("#fff"), distCIEDE2000()));
419
421
  #### Sorting memory-mapped colors
420
422
 
421
423
  Memory mapped colors (e.g. a mapped pixel buffer) can be sorted (in place) via
422
- `sortMapped()`. This function does NOT change the order of elements in the given
423
- colors array, BUT instead sorts the apparent order by swapping the contents of
424
- the backing memory.
424
+ [`sortMapped()`](https://docs.thi.ng/umbrella/color/functions/sortMapped.html).
425
+ This function does NOT change the order of elements in the given colors array,
426
+ BUT instead sorts the apparent order by swapping the contents of the backing
427
+ memory.
425
428
 
426
429
  See the [pixel sorting
427
430
  example](https://github.com/thi-ng/umbrella/tree/develop/examples/pixel-sorting)
@@ -461,12 +464,22 @@ console.log(buf);
461
464
 
462
465
  ### Gradients
463
466
 
467
+ The package provides several approaches, functions and presets to declaratively
468
+ define color gradients and then sample them at user-defined resolutions to
469
+ compute arrays of colors which can then be used for look-up purposes (e.g.
470
+ mapping data values to colors).
471
+
464
472
  #### Multi-stop gradients in any color space
465
473
 
466
- The `multiColorGradient()` function can be used to generate gradients in any
467
- color space and gradient stops must be using all the same color type. Colors are
468
- pairwise interpolated, and by default, uses generic `mix()` function which
469
- delegates to type specific strategies. See `GradientOpts` for details.
474
+ The
475
+ [`multiColorGradient()`](https://docs.thi.ng/umbrella/color/functions/multiColorGradient.html)
476
+ function can be used to generate gradients in any color space and gradient stops
477
+ must be using all the same color type. Colors are pairwise interpolated, and by
478
+ default, uses generic
479
+ [`mix()`](https://docs.thi.ng/umbrella/color/functions/mix.html) function which
480
+ delegates to type specific strategies. See
481
+ [`GradientOpts`](https://docs.thi.ng/umbrella/color/interfaces/GradientOpts.html)
482
+ for details.
470
483
 
471
484
  ![LCH example gradient](https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/color/lch-gradient.svg)
472
485
 
@@ -537,8 +550,10 @@ The following presets are bundled (in [`cosine-gradients.ts`](https://github.com
537
550
 
538
551
  ##### Two-color cosine gradients
539
552
 
540
- The `cosineCoeffs()` function can be used to compute the cosine gradient
541
- coefficients between 2 start/end colors:
553
+ The
554
+ [`cosineCoeffs()`](https://docs.thi.ng/umbrella/color/functions/cosineCoeffs-1.html)
555
+ function can be used to compute the cosine gradient coefficients between 2
556
+ start/end colors:
542
557
 
543
558
  ```ts tangle:export/readme-cosine-gradient.ts
544
559
  import { css, cosineCoeffs, cosineGradient } from "@thi.ng/color";
@@ -561,9 +576,11 @@ console.log(
561
576
 
562
577
  ##### Multi-stop gradients
563
578
 
564
- The `multiCosineGradient()` function returns an iterator of raw RGB
565
- colors based on given gradient stops. This iterator computes a cosine
566
- gradient between each color stop and yields a sequence of RGB values.
579
+ The
580
+ [`multiCosineGradient()`](https://docs.thi.ng/umbrella/color/functions/multiCosineGradient.html)
581
+ function returns an iterator of raw RGB colors based on given gradient stops.
582
+ This iterator computes a cosine gradient between each color stop and yields a
583
+ sequence of RGB values.
567
584
 
568
585
  ```ts tangle:export/readme-multi-cosine-gradient.ts
569
586
  import { css, multiCosineGradient, srgb } from "@thi.ng/color";
@@ -698,38 +715,39 @@ Note: @thi.ng/api is in _most_ cases a type-only import (not used at runtime)
698
715
 
699
716
  ## Usage examples
700
717
 
701
- 26 projects in this repo's
718
+ 27 projects in this repo's
702
719
  [/examples](https://github.com/thi-ng/umbrella/tree/develop/examples)
703
720
  directory are using this package:
704
721
 
705
- | Screenshot | Description | Live demo | Source |
706
- |:-------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------|:-------------------------------------------------------------|:------------------------------------------------------------------------------------------|
707
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/boid-basics.png" width="240"/> | Basic 2D boid simulation and spatial indexing neighbor lookups | [Demo](https://demo.thi.ng/umbrella/boid-basics/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/boid-basics) |
708
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/color-themes.png" width="240"/> | Probabilistic color theme generator | [Demo](https://demo.thi.ng/umbrella/color-themes/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/color-themes) |
709
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/commit-heatmap.png" width="240"/> | Heatmap visualization of this mono-repo's commits | | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/commit-heatmap) |
710
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/dominant-colors.png" width="240"/> | Color palette generation via dominant color extraction from uploaded images | [Demo](https://demo.thi.ng/umbrella/dominant-colors/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/dominant-colors) |
711
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/fiber-basics.png" width="240"/> | Fiber-based cooperative multitasking basics | [Demo](https://demo.thi.ng/umbrella/fiber-basics/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/fiber-basics) |
712
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/geom-complex-poly.png" width="240"/> | Shape conversions & operations using polygons with holes | [Demo](https://demo.thi.ng/umbrella/geom-complex-poly/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/geom-complex-poly) |
713
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/geom-csv-piechart.png" width="240"/> | Piechart visualization of CSV data | [Demo](https://demo.thi.ng/umbrella/geom-csv-piechart/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/geom-csv-piechart) |
714
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/geom-unique-edges.png" width="240"/> | Iterating the unique edges of a tessellation | [Demo](https://demo.thi.ng/umbrella/geom-unique-edges/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/geom-unique-edges) |
715
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/geom-webgl-attrib-pool.jpg" width="240"/> | Augmenting thi.ng/geom shapes for WebGL, using instancing & attribute buffers | [Demo](https://demo.thi.ng/umbrella/geom-webgl-attrib-pool/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/geom-webgl-attrib-pool) |
716
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/geom-webgl-basics.jpg" width="240"/> | Converting thi.ng/geom shape types for WebGL | [Demo](https://demo.thi.ng/umbrella/geom-webgl-basics/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/geom-webgl-basics) |
717
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/grid-iterators.png" width="240"/> | Visualization of different grid iterator strategies | [Demo](https://demo.thi.ng/umbrella/grid-iterators/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/grid-iterators) |
718
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/hdom-canvas/hdom-canvas-shapes-results.png" width="240"/> | Various hdom-canvas shape drawing examples & SVG conversion / export | [Demo](https://demo.thi.ng/umbrella/hdom-canvas-shapes/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/hdom-canvas-shapes) |
719
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/hiccup-canvas-basics.png" width="240"/> | Basic hiccup-based canvas drawing | [Demo](https://demo.thi.ng/umbrella/hiccup-canvas-basics/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/hiccup-canvas-basics) |
720
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/kmeans-viz.jpg" width="240"/> | k-means clustering visualization | [Demo](https://demo.thi.ng/umbrella/kmeans-viz/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/kmeans-viz) |
721
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/pixel-colormatrix.jpg" width="240"/> | Matrix-based image color adjustments | [Demo](https://demo.thi.ng/umbrella/pixel-colormatrix/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/pixel-colormatrix) |
722
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/pixel-gradients.jpg" width="240"/> | Randomized 4-point 2D color gradient image generator | [Demo](https://demo.thi.ng/umbrella/pixel-gradients/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/pixel-gradients) |
723
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/pixel-indexed.jpg" width="240"/> | Image dithering and remapping using indexed palettes | [Demo](https://demo.thi.ng/umbrella/pixel-indexed/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/pixel-indexed) |
724
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/pixel-sorting.png" width="240"/> | Interactive pixel sorting tool using thi.ng/color & thi.ng/pixel | [Demo](https://demo.thi.ng/umbrella/pixel-sorting/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/pixel-sorting) |
725
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/poly-subdiv.jpg" width="240"/> | Animated, iterative polygon subdivisions & visualization | [Demo](https://demo.thi.ng/umbrella/poly-subdiv/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/poly-subdiv) |
726
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/rdom-reactive-svg.jpg" width="240"/> | Animated SVG elements with reactive attributes | [Demo](https://demo.thi.ng/umbrella/rdom-reactive-svg/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rdom-reactive-svg) |
727
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/shader-ast-workers.jpg" width="240"/> | Fork-join worker-based raymarch renderer (JS/CPU only) | [Demo](https://demo.thi.ng/umbrella/shader-ast-workers/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/shader-ast-workers) |
728
- | <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) |
729
- | <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) |
730
- | <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) |
731
- | <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) |
732
- | <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) |
722
+ | Screenshot | Description | Live demo | Source |
723
+ |:-------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:-------------------------------------------------------------|:------------------------------------------------------------------------------------------|
724
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/boid-basics.png" width="240"/> | Basic 2D boid simulation and spatial indexing neighbor lookups | [Demo](https://demo.thi.ng/umbrella/boid-basics/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/boid-basics) |
725
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/color-contrast.avif" width="240"/> | Tool to interactively compute & visualize color contrasts against WCAG threshold | [Demo](https://demo.thi.ng/umbrella/color-contrast/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/color-contrast) |
726
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/color-themes.png" width="240"/> | Probabilistic color theme generator | [Demo](https://demo.thi.ng/umbrella/color-themes/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/color-themes) |
727
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/commit-heatmap.png" width="240"/> | Heatmap visualization of this mono-repo's commits | | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/commit-heatmap) |
728
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/dominant-colors.png" width="240"/> | Color palette generation via dominant color extraction from uploaded images | [Demo](https://demo.thi.ng/umbrella/dominant-colors/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/dominant-colors) |
729
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/fiber-basics.png" width="240"/> | Fiber-based cooperative multitasking basics | [Demo](https://demo.thi.ng/umbrella/fiber-basics/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/fiber-basics) |
730
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/geom-complex-poly.png" width="240"/> | Shape conversions & operations using polygons with holes | [Demo](https://demo.thi.ng/umbrella/geom-complex-poly/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/geom-complex-poly) |
731
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/geom-csv-piechart.png" width="240"/> | Piechart visualization of CSV data | [Demo](https://demo.thi.ng/umbrella/geom-csv-piechart/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/geom-csv-piechart) |
732
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/geom-unique-edges.png" width="240"/> | Iterating the unique edges of a tessellation | [Demo](https://demo.thi.ng/umbrella/geom-unique-edges/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/geom-unique-edges) |
733
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/geom-webgl-attrib-pool.jpg" width="240"/> | Augmenting thi.ng/geom shapes for WebGL, using instancing & attribute buffers | [Demo](https://demo.thi.ng/umbrella/geom-webgl-attrib-pool/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/geom-webgl-attrib-pool) |
734
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/geom-webgl-basics.jpg" width="240"/> | Converting thi.ng/geom shape types for WebGL | [Demo](https://demo.thi.ng/umbrella/geom-webgl-basics/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/geom-webgl-basics) |
735
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/grid-iterators.png" width="240"/> | Visualization of different grid iterator strategies | [Demo](https://demo.thi.ng/umbrella/grid-iterators/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/grid-iterators) |
736
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/hdom-canvas/hdom-canvas-shapes-results.png" width="240"/> | Various hdom-canvas shape drawing examples & SVG conversion / export | [Demo](https://demo.thi.ng/umbrella/hdom-canvas-shapes/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/hdom-canvas-shapes) |
737
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/hiccup-canvas-basics.png" width="240"/> | Basic hiccup-based canvas drawing | [Demo](https://demo.thi.ng/umbrella/hiccup-canvas-basics/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/hiccup-canvas-basics) |
738
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/kmeans-viz.jpg" width="240"/> | k-means clustering visualization | [Demo](https://demo.thi.ng/umbrella/kmeans-viz/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/kmeans-viz) |
739
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/pixel-colormatrix.jpg" width="240"/> | Matrix-based image color adjustments | [Demo](https://demo.thi.ng/umbrella/pixel-colormatrix/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/pixel-colormatrix) |
740
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/pixel-gradients.jpg" width="240"/> | Randomized 4-point 2D color gradient image generator | [Demo](https://demo.thi.ng/umbrella/pixel-gradients/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/pixel-gradients) |
741
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/pixel-indexed.jpg" width="240"/> | Image dithering and remapping using indexed palettes | [Demo](https://demo.thi.ng/umbrella/pixel-indexed/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/pixel-indexed) |
742
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/pixel-sorting.png" width="240"/> | Interactive pixel sorting tool using thi.ng/color & thi.ng/pixel | [Demo](https://demo.thi.ng/umbrella/pixel-sorting/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/pixel-sorting) |
743
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/poly-subdiv.jpg" width="240"/> | Animated, iterative polygon subdivisions & visualization | [Demo](https://demo.thi.ng/umbrella/poly-subdiv/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/poly-subdiv) |
744
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/rdom-reactive-svg.jpg" width="240"/> | Animated SVG elements with reactive attributes | [Demo](https://demo.thi.ng/umbrella/rdom-reactive-svg/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rdom-reactive-svg) |
745
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/shader-ast-workers.jpg" width="240"/> | Fork-join worker-based raymarch renderer (JS/CPU only) | [Demo](https://demo.thi.ng/umbrella/shader-ast-workers/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/shader-ast-workers) |
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
+ | <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
+ | <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/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
+ | <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) |
733
751
 
734
752
  ## API
735
753
 
package/index.d.ts CHANGED
@@ -4,10 +4,37 @@ export * from "./api/gradients.js";
4
4
  export * from "./api/names.js";
5
5
  export * from "./api/ranges.js";
6
6
  export * from "./api/system.js";
7
+ export * from "./alpha.js";
8
+ export * from "./analog.js";
9
+ export * from "./clamp.js";
10
+ export * from "./closest-hue.js";
11
+ export * from "./color-range.js";
7
12
  export * from "./color.js";
8
13
  export * from "./contrast.js";
9
14
  export * from "./convert.js";
15
+ export * from "./cosine-gradients.js";
10
16
  export * from "./defcolor.js";
17
+ export * from "./distance.js";
18
+ export * from "./gradients.js";
19
+ export * from "./hue.js";
20
+ export * from "./invert.js";
21
+ export * from "./is-black.js";
22
+ export * from "./is-gamut.js";
23
+ export * from "./is-gray.js";
24
+ export * from "./is-white.js";
25
+ export * from "./lighten.js";
26
+ export * from "./linear.js";
27
+ export * from "./luminance-rgb.js";
28
+ export * from "./luminance.js";
29
+ export * from "./max-chroma.js";
30
+ export * from "./mix.js";
31
+ export * from "./rotate.js";
32
+ export * from "./sort.js";
33
+ export * from "./strategies.js";
34
+ export * from "./swatches.js";
35
+ export * from "./tint.js";
36
+ export * from "./transform.js";
37
+ export * from "./variations.js";
11
38
  export * from "./css/css.js";
12
39
  export * from "./css/parse-css.js";
13
40
  export * from "./hcy/hcy-rgb.js";
@@ -44,32 +71,6 @@ export * from "./oklch/oklch-css.js";
44
71
  export * from "./oklch/oklch-oklab.js";
45
72
  export * from "./oklch/oklab-oklch.js";
46
73
  export * from "./oklch/oklch.js";
47
- export * from "./alpha.js";
48
- export * from "./analog.js";
49
- export * from "./clamp.js";
50
- export * from "./closest-hue.js";
51
- export * from "./color-range.js";
52
- export * from "./cosine-gradients.js";
53
- export * from "./distance.js";
54
- export * from "./gradients.js";
55
- export * from "./hue.js";
56
- export * from "./invert.js";
57
- export * from "./is-black.js";
58
- export * from "./is-gamut.js";
59
- export * from "./is-gray.js";
60
- export * from "./is-white.js";
61
- export * from "./linear.js";
62
- export * from "./luminance-rgb.js";
63
- export * from "./luminance.js";
64
- export * from "./max-chroma.js";
65
- export * from "./mix.js";
66
- export * from "./rotate.js";
67
- export * from "./sort.js";
68
- export * from "./strategies.js";
69
- export * from "./swatches.js";
70
- export * from "./tint.js";
71
- export * from "./transform.js";
72
- export * from "./variations.js";
73
74
  export * from "./rgb/hue-rgb.js";
74
75
  export * from "./rgb/kelvin-rgba.js";
75
76
  export * from "./rgb/rgb-css.js";
package/index.js CHANGED
@@ -4,10 +4,37 @@ export * from "./api/gradients.js";
4
4
  export * from "./api/names.js";
5
5
  export * from "./api/ranges.js";
6
6
  export * from "./api/system.js";
7
+ export * from "./alpha.js";
8
+ export * from "./analog.js";
9
+ export * from "./clamp.js";
10
+ export * from "./closest-hue.js";
11
+ export * from "./color-range.js";
7
12
  export * from "./color.js";
8
13
  export * from "./contrast.js";
9
14
  export * from "./convert.js";
15
+ export * from "./cosine-gradients.js";
10
16
  export * from "./defcolor.js";
17
+ export * from "./distance.js";
18
+ export * from "./gradients.js";
19
+ export * from "./hue.js";
20
+ export * from "./invert.js";
21
+ export * from "./is-black.js";
22
+ export * from "./is-gamut.js";
23
+ export * from "./is-gray.js";
24
+ export * from "./is-white.js";
25
+ export * from "./lighten.js";
26
+ export * from "./linear.js";
27
+ export * from "./luminance-rgb.js";
28
+ export * from "./luminance.js";
29
+ export * from "./max-chroma.js";
30
+ export * from "./mix.js";
31
+ export * from "./rotate.js";
32
+ export * from "./sort.js";
33
+ export * from "./strategies.js";
34
+ export * from "./swatches.js";
35
+ export * from "./tint.js";
36
+ export * from "./transform.js";
37
+ export * from "./variations.js";
11
38
  export * from "./css/css.js";
12
39
  export * from "./css/parse-css.js";
13
40
  export * from "./hcy/hcy-rgb.js";
@@ -44,32 +71,6 @@ export * from "./oklch/oklch-css.js";
44
71
  export * from "./oklch/oklch-oklab.js";
45
72
  export * from "./oklch/oklab-oklch.js";
46
73
  export * from "./oklch/oklch.js";
47
- export * from "./alpha.js";
48
- export * from "./analog.js";
49
- export * from "./clamp.js";
50
- export * from "./closest-hue.js";
51
- export * from "./color-range.js";
52
- export * from "./cosine-gradients.js";
53
- export * from "./distance.js";
54
- export * from "./gradients.js";
55
- export * from "./hue.js";
56
- export * from "./invert.js";
57
- export * from "./is-black.js";
58
- export * from "./is-gamut.js";
59
- export * from "./is-gray.js";
60
- export * from "./is-white.js";
61
- export * from "./linear.js";
62
- export * from "./luminance-rgb.js";
63
- export * from "./luminance.js";
64
- export * from "./max-chroma.js";
65
- export * from "./mix.js";
66
- export * from "./rotate.js";
67
- export * from "./sort.js";
68
- export * from "./strategies.js";
69
- export * from "./swatches.js";
70
- export * from "./tint.js";
71
- export * from "./transform.js";
72
- export * from "./variations.js";
73
74
  export * from "./rgb/hue-rgb.js";
74
75
  export * from "./rgb/kelvin-rgba.js";
75
76
  export * from "./rgb/rgb-css.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/color",
3
- "version": "5.7.3",
3
+ "version": "5.7.4",
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",
@@ -51,8 +51,8 @@
51
51
  "@thi.ng/math": "^5.11.9",
52
52
  "@thi.ng/random": "^4.0.3",
53
53
  "@thi.ng/strings": "^3.8.4",
54
- "@thi.ng/transducers": "^9.2.2",
55
- "@thi.ng/vectors": "^7.12.0"
54
+ "@thi.ng/transducers": "^9.2.3",
55
+ "@thi.ng/vectors": "^7.12.1"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@microsoft/api-extractor": "^7.47.5",
@@ -444,5 +444,5 @@
444
444
  "vectors"
445
445
  ]
446
446
  },
447
- "gitHead": "9f71f7f82fed2a980078a96bdafd2e706f526c75\n"
447
+ "gitHead": "8335e9571c2b9b13844ee4d8d24f99143c5f8816\n"
448
448
  }