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

only identity if all values are colors #676

Merged
merged 2 commits into from
Jan 17, 2022

Conversation

mbostock
Copy link
Member

@mbostock mbostock commented Jan 16, 2022

Amendment to #673 and alternative to #660 and #675. I think this is my preference because it feels more semantic than using an ordinal scale (even though this means you won’t get a legend, but I don’t think you want a legend for an identity scale). And unlike #673 alone this will reduce the likelihood of false positives since all defined values must be valid CSS colors. That’s a bit more strict than we usually do, but I think it’s okay since there isn’t a special type for colors and hence we must test strings.

@mbostock mbostock requested a review from Fil January 16, 2022 23:00
@mbostock mbostock merged commit 3220bad into mbostock/color-identity Jan 17, 2022
@mbostock mbostock deleted the mbostock/color-identity-strict branch January 17, 2022 04:51
mbostock added a commit that referenced this pull request Jan 18, 2022
* automatic color identity scale

* only identity if all values are colors (#676)

* only identity if all values are colors

* comments

* don’t use identity if scheme or range

* comments on scale type inference

* DRY

* Update README
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 this pull request may close these issues.

1 participant