Skip to content

{rgb,hsl}.clamp()#102

Merged
mbostock merged 2 commits intomainfrom
mbostock/clamp
Mar 28, 2022
Merged

{rgb,hsl}.clamp()#102
mbostock merged 2 commits intomainfrom
mbostock/clamp

Conversation

@mbostock
Copy link
Copy Markdown
Member

Related #101.

@mbostock mbostock requested a review from Fil March 28, 2022 16:43
@Fil
Copy link
Copy Markdown
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
Copy Markdown
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