Skip to content

Add support for 4 and 8 digit hex codes#67

Merged
mbostock merged 4 commits intod3:masterfrom
zerovox:master
Sep 25, 2019
Merged

Add support for 4 and 8 digit hex codes#67
mbostock merged 4 commits intod3:masterfrom
zerovox:master

Conversation

@zerovox
Copy link
Copy Markdown
Contributor

@zerovox zerovox commented Sep 19, 2019

Fixes #60

Wasn't sure how to concisely update the documentation, as this doesn't add support for the full css 4 spec, which now supports gray, hwb, lab, lch and others.

@mbostock

@mbostock mbostock merged commit 6d5e89c into d3:master Sep 25, 2019
@mbostock
Copy link
Copy Markdown
Member

Thanks for the contribution.

One question I have is now whether color.formatHex() should return an 8-digit hexadecimal when the color has opacity != 1.0. But that probably would want a major version bump as this isn’t strictly backwards-compatible.

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.

Support for 4- and 8-digit hexadecimal codes.

2 participants