Now the coloring is simple like this.
double colorRatio = (1 - (double)iter / MAX_ITER);
colors[i][j] = *(struct Color*) malloc(sizeof(struct Color));
colors[i][j].R = 255 * 1.15 * colorRatio;
colors[i][j].G = 255 * 0.56 * colorRatio;
colors[i][j].B = 255 * 1.7 *colorRatio;
This should be generalized, i would recommend a function parameter, so that the coloring could be changed easily.
Now the coloring is simple like this.
This should be generalized, i would recommend a function parameter, so that the coloring could be changed easily.