Add support for background_color
definition in avatar NFT metadata.
#63
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds support for the
background_color
metadata field defined in the OpenSea NFT metadata standard.I use this for the OneDayPunk collection where the NFT image is transparent, but OpenSea renders the defined background color dynamically. Compare: Metadata and Listings ons OpenSea.
ENS domains with which you can test this:
hearsay.eth
:/mainnet/0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85/31411427214583513713469664551403800555885474761460246739458092438773891575394/image
vincet.eth
:/mainnet/0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85/0xb70727ffaffb3b37ce8ee412bba864bf2489ce0120d3d79a0b39e83a685729aa/image
Note/Feedback: I think the architecture / setup here is somewhat complicated and could be further simplified but i didn't want to restructure more than i already have in the context of this pull request. Happy to take a stab though. Also it would be cool to work on support for dynamically rendered avatar backgrounds (being other NFTs, potentially via the header field).