Sitelet https://github.com/d3/d3-color/pull/67
Skip to content

Add support for 4 and 8 digit hex codes - #67

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

mbostock merged 4 commits into
d3:masterfrom
zerovox:master

Conversation

@zerovox

@zerovox zerovox commented Sep 19, 2019

Copy link
Copy Markdown
Contributor

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