Skip to content
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

[getAll] Add an option(?) so that formatted coords can be returned #542

Closed
DmitrySharabin opened this issue Jun 10, 2024 · 1 comment · Fixed by #548
Closed

[getAll] Add an option(?) so that formatted coords can be returned #542

DmitrySharabin opened this issue Jun 10, 2024 · 1 comment · Fixed by #548

Comments

@DmitrySharabin
Copy link
Member

This idea initially came from the need to show coords in a color swatch formatted as they are in the parsed color. Something like this:

image

@LeaVerou pointed out that, unfortunately, there is no way to do it now, but it might be a good feature of getAll().

So, I'm filing this issue to request this feature. 🙃

@LeaVerou
Copy link
Member

Low hanging fruit would be to add precision, we could also add type which would serialize to <angle> or <percentage>.

@MysteryBlokHed MysteryBlokHed linked a pull request Jun 11, 2024 that will close this issue
LeaVerou pushed a commit that referenced this issue Jun 12, 2024
* [getAll] Support precision, closes #542

* Switch to the options parameter

* Revert "Switch to the options parameter"

This reverts commit 4c52663.

* Address feedback

* Update src/getAll.js

Co-authored-by: Adam Thompson-Sharpe <adamthompsonsharpe@gmail.com>

* Update src/getAll.js

Co-authored-by: Adam Thompson-Sharpe <adamthompsonsharpe@gmail.com>

* Add overloads

* Simplify code

* Leftover

---------

Co-authored-by: Adam Thompson-Sharpe <adamthompsonsharpe@gmail.com>
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 a pull request may close this issue.

2 participants