Well, it's not really user-friendly

You can create a material image this way:
1) Create a new image
2) Choose 5 colors you want to use for the various types of material, you can choose any colors you like
3) Draw something with each of the colors and also fill the background with one of the colors and save the image as PNG 8
4) Open the image in
IrfanView (or any other program that can view the palette), choose Image -> Palette -> Edit Palette. You should see a palette with 5 colors you have chosen.
5) The order of the colors in the palette decides the type of the material - first one is solid, second one is background air, third one is dirt, fourth one is special dirt and fifth one is special rock.
6) Reopen the image in your favorite editor and use these colors to draw the materials
Example:
1) I used Photoshop and created a new image and choose 5 colors:
Black (#000000)
Blue (#0000FF)
Brown (#884400)
Red (#FF0000)
Gray (#808080)
2) Choose pencil and draw one pixel black, one pixel blue, one pixel brown, one pixel red, one pixel gray.
3) Choose Flood Fill and fill the transparent area with blue
4) Choose File -> Save for Web (Alt + Shift + Ctrl + S)
5) As the format choose PNG-8, uncheck transparency, choose Adaptive palette. Photoshop also shows the color table, it should contain 5 colors and look like this:

6) Save & close the image in Photoshop
7) Open IrfanView, choose Image -> Palette -> Edit Palette and you should see something like this:

Alternatively, if you want to stay in Photoshop, you can choose Image -> Mode -> Color Table which shows the same info. You don't even need to close & reopen the file after saving.
8 ) In my case, the colors were assigned like this:
Red = Solid (Rock)
Black = Background (Air)
Gray = Dirt (Destructible)
Brown = Special dirt (Destructible. Worms can go through it but particles can't.)
Blue = Special rock (Solid. Worms can't go through it but particles can.)
9) Reopen the image and start designing the material