Skip to content

Gamut boundaries, gamut fitting, workers and more#50

Merged
argyleink merged 16 commits intomainfrom
color-pool-features
Mar 24, 2026
Merged

Gamut boundaries, gamut fitting, workers and more#50
argyleink merged 16 commits intomainfrom
color-pool-features

Conversation

@argyleink
Copy link
Copy Markdown
Owner

@argyleink argyleink commented Mar 22, 2026

This branch modernizes the color area picker, moving heavy math off the main thread for smoother interaction. It adds gamut visualization/controls (lines, boundary zoom, stretching), CSS anchor progressive enhancement, ships a small perf pass, refreshes docs/examples, and updates styles.

Highlights
• New web worker for area computations to keep UI responsive.
• Gamut tools: lines, boundary zoom, and stretching for better out‑of‑gamut handling.
• Performance tune-up in core picker flow.
• Docs expanded and reorganized with refreshed demos and styles.
• Perf fix suggestion from @TrySound ❤️

Technical changes
• Added worker: src/area-picker.worker.ts (off‑thread calculations).
• Major refactor/expansion: src/area-picker.ts.
• Targeted updates: src/color-input.ts, src/utils/positioning.ts, src/utils/template.ts.
• New stylesheet entry: src/styles/index.css.

Docs and styles
• Docs pages updated: advanced.mdx, api.mdx, index.mdx, styling.mdx.
• Demo/components updates: ColorInputDemo.astro, EventLogger.astro, Head.astro.
• Style tweaks: docs/src/styles/{custom.css,demos.css}.

Stats
• 16 files changed, 1683 insertions, 468 deletions.
• Largest changes: src/area-picker.ts (+787 −60), src/area-picker.worker.ts (+489 −0), docs/src/styles/demos.css (+101 −59), src/styles/index.css (+61 −0), src/color-input.ts (+57 −15).

Breaking changes
• None detected (no “BREAKING CHANGE” or “!” commits found).

How to test
• Verify smooth interaction under rapid pointer movement (worker offloads).
• Exercise gamut tools: lines render correctly; boundary zoom focuses edges; stretching behaves predictably for out‑of‑gamut colors.
• Sanity-check color-input integration and positioning utilities.
• Review updated docs pages build and render correctly with refreshed demos.

Checklist
Cross-browser smoke test (Chromium, WebKit, Firefox).
Confirm no regressions in keyboard/mouse/touch interactions.
Verify docs navigation and anchors still function.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 22, 2026

Deploy Preview for color-input ready!

Name Link
🔨 Latest commit 9875389
🔍 Latest deploy log https://un5my6r2ggqbxgwjp41g.julianrbryant.com/projects/color-input/deploys/69c210c4bc8b9700084a7c96
😎 Deploy Preview https://deploy-preview-50--color-input.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@argyleink argyleink merged commit f7093e9 into main Mar 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant