8000 {rgb,hsl}.clamp() by mbostock · Pull Request #102 · d3/d3-color · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

{rgb,hsl}.clamp() #102

New issue

Have a question about this project? Sign up for a free GitHub 8000 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

Merged
merged 2 commits into from
Mar 28, 2022
Merged

{rgb,hsl}.clamp() #102

merged 2 commits into from
Mar 28, 2022

Conversation

mbostock
Copy link
Member

Related #101.

@mbostock mbostock requested a review from Fil March 28, 2022 16:43
@Fil
Copy link
Member
Fil commented Mar 28, 2022

Is it only rgb and hsl colors that can be clamped? In that case, should we have a default method for the other color types, for API consistence (i.e. an alias of color.copy)?

@mbostock
Copy link
Member Author

Yes, only RGB and HSL. These are “hardware” color spaces whereas the other ones are more abstract.

@mbostock mbostock merged commit ac660c6 into main Mar 28, 2022
@mbostock mbostock deleted the mbostock/clamp branch March 28, 2022 18:04 < 72A0 /div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0