feat: Add <ColorPlus> component with support for more color formats#38
Draft
kitschpatrol wants to merge 27 commits into
Draft
feat: Add <ColorPlus> component with support for more color formats#38kitschpatrol wants to merge 27 commits into
<ColorPlus> component with support for more color formats#38kitschpatrol wants to merge 27 commits into
Conversation
# Conflicts: # cspell.config.js # package.json # src/lib/control/Color.svelte
# Conflicts: # package.json
# Conflicts: # package.json
# Conflicts: # docs/package.json # package.json # pnpm-lock.yaml
# Conflicts: # cspell.config.js # package.json # pnpm-lock.yaml
# Conflicts: # package.json
# Conflicts: # cspell.config.js # package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new
<ColorPlus>component with support for many more color formats like OKLCH via tweakpane-plugin-color-plus and Color.js.For now, the UI remains effectively identical to the vanilla Tweakpane color widget.
This is a work in progress, but if anyone wants the new component right away, it's available as a preview release on NPM:
I'm already using it in other projects like tweakpane-css.
I'm not 100% sure that adding another component alongside the existing
<Color>component is worth it, but I'm also not sure that simply replacing the existing<Color>component with this one is a great idea given the risk of either new bugs or subtle behavior changes bubbling up from the complexity of the underlying implementation. It's also kind of heavy at ~30kB compressed. But... something to consider for the next major.If anyone has thoughts on how best to integrate this from a DX perspective, please feel free to comment in this PR.