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

{rgb,hsl}.clamp() #102

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
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