What types of pigments can be used when making your own filaments? There are many types of pigments made for paint, food, fabric, cosmetic and finally plastic pigments. I guess we need pigments made for plastic, or at least pigments which won't decompose, burn or lose their properties at the temperatures inside the filament extrusion machines (around 240C).

So what type of pigment are we looking for (does that type have a name?) and where can they be found (off-the-shelf from some specialized paint store or is it a more specialized pigment for plastics which is harder to source)?
The normal way pigment is added to filament (or any other extruded plastic product) is by mixing "masterbatch" pellets containing a high concentration of dye with the raw resin pellets. (https://en.wikipedia.org/wiki/Masterbatch) This is significantly easier and more reliable than trying to mix raw pigments into the plastic -- the likelihood of clumping and other issues is greatly reduced.

You can buy these masterbatch pellets and mix up colors in whatever ratios you want to achieve specific output colors. Just make sure the masterbatch pellet carrier material is compatible with your resin. There are a wide variety of vendors, including ebay.