Closed DmitrySharabin closed 3 months ago
Name | Link |
---|---|
Latest commit | aa6db63fc85af94acddabd2cbb0c5b1ea5f142e0 |
Latest deploy log | https://app.netlify.com/sites/colorjs/deploys/6669a09a10e10d000804bed9 |
I don't think we want a separate parameter here, we'd want to make the second param an options object with
space
andprecision
as keys. Specifying a color space (either as a string orColorSpace
object should still work.
Agreed. Done. Could you please have another look?
Something like this in toGamut.js
could be used maybe?
Where a destructured object is used as a parameter, but then arguments
is used to check if something else was passed. So if it's a string or instance of a color space, then space
is just set to arguments[1]
.
Something like this in
toGamut.js
could be used maybe?Where a destructured object is used as a parameter, but then
arguments
is used to check if something else was passed. So if it's a string or instance of a color space, thenspace
is just set toarguments[1]
.
I was thinking of something like this, too. Thank you so much for the hint! π
@MysteryBlokHed, could you please check if I get the idea with overloads right?
@DmitrySharabin do you have access to edit the release notes for v0.6.0 to mention this? (make sure not to accidentally publish!)
@DmitrySharabin do you have access to edit the release notes for v0.6.0 to mention this? (make sure not to accidentally publish!)
It looks like I don't β I don't see any drafts of release notes.
Ensure that itβs something you had in mind, though. My approach is relatively straightforward. We should probably have an optional
options
parameter withprecision
as a property.