-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[color-slider] inside [color-picker] Jzazbz: jz and bz slider glitches #163
Comments
It looks like we have this issue because some of the slider's color stops have the value |
Actually, we have a FIXME comment from Lea there: elements/src/color-slider/color-slider.js Line 74 in 24ac3f7
@LeaVerou, could you please elaborate a bit on what should happen with such colors? |
Is this simply a case of btw - It looks like you just changed the way you display the numeric inputs that display above the sliders. It's an improvement, but you should consider using my I should have an NPM package ready later this week, along with a
To my surprise, the most novel thing about |
|
Digging into this a bit more, I learned that the actual line where we get value like elements/src/color-slider/color-slider.js Line 102 in 2adcc7d
Precisely, the stops = stops.map(color => color.display()).filter(c => c.color.coords.every(coord => !Number.isNaN(coord))).join(", "); However, we might end up with a thumb color that does not correspond to the slider's color at that point. And that's not correct, right? |
In this specific case, should there even be undisplayable stops that need filtering? Or is there something wrong in specifying the undisplayable stops? There should be a fully displayable set of stops for every supported color channel, right? That's not to say you don't need to answer your general question of how to deal with illegitimate stops when they arise inside this element, if the user sets something wrong. That might be more of an issue for You just caused me to ask this question that I posted in the Discussions on the main color.js repo. |
Ha! I had it backwards based on reading the online docs. Thanks for clarifying. (not that the docs are wrong). |
In your docs page: https://elements.colorjs.io/src/color-picker/#dynamic
The text was updated successfully, but these errors were encountered: