Starry Nights @ EthBlockArt

Night skies, colourful stars and even mysterious black holes all thanks to Ethereum blocks’ data.

6 min readMar 28, 2021

Starry Nights is a generative coding Style of 64 limited edition digital prints uploaded to the EthBlockArt platform. It’s meant to be a shiny colourful universe that Creators can alter to create a much more diverse ecosystem made just of circles and gradients.

About EthBlockArt

Recently minted artworks

EthBlockArt is the most unique blockchain-based generative art platform joining this NFT craze we live in. It’s a platform where creative coders upload their Styles, a piece of code that returns a different artwork for each Ethereum block using the blocks information as a source of deterministic entropy, as in, for each Style, each block will always produce the same artwork.

To add one more layer of awesomeness/complexity, the Style generated by the artist/creative coder, can then be modified by the Buyer/Creator of the actual artwork. Each Style includes several modifiers which will change the artwork’s visual Style within certain parameters.

With the website having launched in January, there are currently 20 Styles generated by 14 different Creators. Some of these Creators include NFT Generative Art OGs like ArtplusBrad, bestsellers like //pxlq or Ethereum superstar developers like Austin Griffith to name a few.

Minting on EthBlockArt

To mint an artwork, after selecting their favourite Style, the Buyer/Creator chooses a block, whether it be of significance to them (timestamp) or to Ethereum’s history (upgrades, ATH…), or even at random for purely aesthetic satisfaction, and then has the option to modify parameters within the constraints established by the Style Creator.

The minting process

Once happy with the visual output, the minting pop up will allow adding a title and a description, and finally minting the artwork by paying the price + gas fees.

It’s relevant to note that while the Style Creator gets minting fees, the final Creator will get first sale and resale fees on Opensea if they decide to sell their artwork in the future.

One more interesting trait of the minting process is pricing. While each artist selects a base fee they want to sell their work for, there is a block fee added on top of it. This block fee is very low for most blocks except for the last 1000 blocks and those blocks that have already had a print created on them. On these reused blocks, the Style Creator multiplier fee makes an appearance being used to multiply the price to pay from the previous minted print.

How Starry Nights was created

I used the P5.js boilerplate Adrian Le Bas from EthBlockArt kindly provides to get started. This scaffolding takes care of the blockchain integration work and lets the creative coder concentrate on creating the artwork itself. The boilerplate allows to determine modifiers, Opensea stats and also includes a Mersenne Twister library for the block’s entropy.

For Starry Nights, each block determines a colour start (from 0–359) and a colour spread (from 0–359). For instance, if a block has a colour start of 300 and a colour spread of 100, this would mean that the hues (HSB) available to that block’s transactions would be between 300–359 and 0–39. Then, each transaction is assigned a position (x, y) and one of the available hues and represented as a circle. I assign a constant saturation and brightness that can’t be altered neither by the block nor the Creator.

One block, dozens of variations

Finally, modifiers are applied to give the user the chance to have great variance within the same block. In essence, one block could let users create dozens of relatively different artworks that share the same colours and stars positions.

These modifiers let the Creator change the size (and size variance) of the stars, from tiny specs to big circles that together occupy most of the canvas; also, the background gradient size (and size variance), intensity and colour diversion—the potential difference between the colour of the star and the colour of the gradient.

Same modifiers, different blocks, colour variance

Hardcoded rare traits

2 rare traits have been coded into the Style.

White stars, where the saturation of stars is taken almost all the way down, occur in around 0.2% of blocks specially in the last couple years.

Black holes on the other hand are much more prevalent, very easy to find in the first 3M blocks and harder and harder around current blocks (around 1%).

White stars and a black hole

Actual Rarity

I think it’s relatively simple to understand and find the above rare traits with a little bit of perspicacity. But in reality, these rare traits are relative since there can only ever be 64 Starry Nights and while there are almost endless possibilities, rarity could actually be determined by how different from each other each creation ends up being.

For instance, there are an estimated 6000 instances of white Starry Nights which means that rarity is potential but not guaranteed.

What is actually guaranteed is that the later the print, the more chances the Creator has to generate a truly unique artwork by examining the previous ones and creating one with previously unminted traits.

To hue or not to hue

There is one implied rarity trait that would actually take a lot of work to find and that would require someone taking the time finding and reading the Style contract to then create a script that scans the blockchain looking for blocks that have at least 360 transactions, where the colour spread is 360 for maximum hue variance and where all hues can be found in at least one star. Chances of this happening are very slim (for a lack of actual calculation).

Even more complicated, if not impossible, would be the “holy grail”; a block with 360 transactions, that has a complete colour spread and where each transaction gets assigned a different hue. Probably not possible.

A lot of hues, or very few

One the other end of the spectrum, we find a rarity trait that’s potentially a little more common to find which is those blocks that paint a canvas with a single hue. A script is needed to verify this as visually it’s not possible to tell close hues from one another. The canvas above, for instance, has a colour spread of 5 (which is shown as a stat on Opensea once the artwork has been minted).


Another goal a Creator might have is to find the matching block to a real-life constellation (Ursa Major, Orion, Cassiopeia…). These constellations can be found, potentially, specially between blocks 1M and 4M when there where single-digit or low double-digit transactions.

3 “constellations” side by side

And also a glitch

During the testing process of the Style, Adrian found a glitch that appears when one of the mod values is very close to 0 but not 0. This glitch converts the background gradients into a white circle with variable girth and size. Because the glitch adds yet another variable to the potential outputs, it stayed.

“Intentional” glitch

Thanks for reading!

If you want to checkout EthBlockArt:

You can also find a growing community here:

To create your own Starry Night you can do it here:

And if you want to say hi:




Creating, collecting and writing about generative art