@colordx/gpu 0.1.0 → 0.1.1
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/README.md +6 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -5,9 +5,13 @@
|
|
|
5
5
|
[](https://github.com/dkryaklin/colordx-gpu/blob/main/package.json)
|
|
6
6
|
[](https://github.com/dkryaklin/colordx-gpu/blob/main/LICENSE)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
[**@colordx/core**](https://github.com/dkryaklin/colordx)'s color math, running on the GPU.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
**The idea:** a color library converts one color at a time, and on the CPU that's the right tool for app logic. But a whole class of color work is *per-pixel*: gamut visualizations, picker charts, gradients, image filters. There you don't want to convert a color — you want to convert **millions of them, every frame**. `@colordx/gpu` takes colordx's conversions — OKLCH/OKLab, CIE LCH/Lab (D50), Display-P3, Rec.2020, gamut tests — and generates GLSL from the library's own constants, so the exact same math runs in a shader at GPU speed. A parity test suite locks the two implementations together: if colordx's math ever changes, the build fails before the shader can drift.
|
|
11
|
+
|
|
12
|
+
What that buys you in practice: work that costs tens of milliseconds across a full worker pool on the CPU takes **well under a millisecond** as a single GPU draw — fast enough to recompute every visible pixel on every frame of a slider drag, at any canvas size up to fullscreen.
|
|
13
|
+
|
|
14
|
+
**What ships today** is the first module built on that foundation: a gamut-slice chart renderer (the core of every OKLCH/LCH picker UI) — slice planes through the color space with sRGB / Display-P3 / Rec.2020 classification and crisp gamut-boundary lines. Next up: the GLSL chunks as public API so you can compose colordx math into your own shaders, gradient strips, and a WebGPU batch-conversion path — see the [Roadmap](#roadmap).
|
|
11
15
|
|
|
12
16
|
## Performance
|
|
13
17
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colordx/gpu",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "GPU
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "colordx color math on the GPU — OKLCH/LCH conversions and gamut tests as generated GLSL, parity-tested against @colordx/core. Ships a WebGL2 gamut-slice chart renderer; shader chunks and WebGPU batch conversion on the roadmap",
|
|
5
5
|
"author": "Dmitrii Kriaklin",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://colordx.dev",
|