The standard visualization for the Mandelbrot set (which is used here) colors pixels according to the number of iterations it takes for the corresponding point to get far enough away from zero that it can no longer be part of the set. It's worth noting that coloring pixels according to the estimated distance to the fractal instead (using a technique like http://iquilezles.org/www/articles/distancefractals/distance...) can produce a more detailed image: pixels very close to a thin edge of the fractal are included in a distance-estimation visualization but can be missed by an escape-time coloring.
A quick, very pedantic note - the images don't show colouring based on linear distance. The problem is that your monitor works in non-linear colourspace - sRGB, while the image is generated in linear RGB but not converted to sRGB afterwards. If you want to show proper colours, you need to convert the final value from RGB to sRGB. For people writing shaders, here are two handy functions I keep around:
It's not pedantic -- interpolation in linear space makes a major difference! It doesn't look like this shader is meant to show distance directly, though: it's taking a fourth root and some other things:
// do some soft coloring based on distance
d = clamp( 8.0*d/zoo, 0.0, 1.0 );
d = pow( d, 0.25 );
vec3 col = vec3( d );
I'm calling it pedantic, because as far as I can see nobody cares outside of people doing movie VFX and the like, where it is actually really really important that you get it right. Your GUI for example doesn't care - elements are blended assuming a linear colourspace, which means that all font rendering is just slightly off. Even Apple don't care to make their blur effects correct - see https://www.youtube.com/watch?v=LKnqECcg6Gw . Even photoshop doesn't do it correctly by default. Almost everybody is perfectly happy treating the values as linear colour intensity.
The bottom line is that sRGB is hideously hard to work in. You really want to only use it for storage and only if you really must. It's an optimisation to allow you better range on the low end, at the expense of the high intensity end, to match human colour vision. However, that means using 48bit RGB and that's not a price everyone wants to pay. People who do professional graphics work simply use 32bit floats per colour channel - 128bit RGBA, or even 192bit RGBRaGaBa (separate alpha for each channel) and have workstations with 32 or 64GB of RAM. However, your normal everyday GUI application needs to run on a phone with about 1GB of RAM. Or going back farther, it has to run on an Intel 486 with 16MB of RAM. That kind of explains where the culture of "just treat it as linear, it's not that wrong" came from :) .