Gradiente: How They’re Made and How to Get One!


Hello! In this article we’ll dive into a Color Blocks spin-off: Gradiente! Below you’ll find out how this computer-generated series is made and how you could get one.

How They’re Made

The Gradiente series is based off of Color Blocks, but it tries to mimic a gradient that we can tell is pixelated.

For instance, here’s what one looks like:

We can see that it’s a little noisy, meaning that there’s some random variation. So here’s how it works:

  1. A color in the top-left is randomly generated. In later versions of the code, I tried to keep the color not super dark or light because otherwise it would hit white or black very easily.
  2. Coefficients, which in the code are of the form (x/y)(red/green/blue), are generated. They range from -0.5 to 0.5 in this version. However, they could take on whatever value.
  3. For each pixel, the color is the starting color plus the coefficients, so yred would be in the formula as y*yred. This is similar to Color Blocks and how the colors of them are decided.
  4. Let’s say that the color that a pixel should be if this were smooth is (r, g, b). The program then adds noise. It does this by, instead of using (r, g, b) as the color, the range of colors between (r + 5, g + 5, b + 5) and (r – 5, g – 5, b – 5). The color is still very similar, but doesn’t stick out like a sore thumb.

An easy way to visualize the RGB area is a 3D cube. It stretches out in one direction to pure red, another to green, and another to blue. The place where all of the axes meet is at (0, 0, 0) or black. The opposite corner is white, or (256, 256, 256). Using this analogy, we are doing the equivalent of taking a 10x10x10 cube for each color (centered at what color it should be) and then randomly deciding on a color within there instead.

Anyway, that’s a lengthy explanation, but it’s pretty simple. They’re basically pixelated gradients whose colors have been tinkered with in the tiniest amount.

How to Get One

Because the collection is not yet posted, if you want one (or want the collection to be posted), reach out to me in the comments or on Twitter and I’ll gladly send one to you!

That’s it for this article! I hope you learned something (and if you needed something to learn, prescription bottles are orange to prevent UV light from damaging the contents!)! So feel free to check out OpenSea for more NFTs like these!

,

Leave a Reply

Your email address will not be published. Required fields are marked *