Thats a good idea, but I have some concerns:
Would adding another texture (even if it is small, 8x8 pixels should do) slow things down alot? This shader will be used by every actor in my world, and although they can all share the same 'colortable texture', I think it has to be sent to the GPU for every object, right? Or will it be cached?

Another idea I came up with is this:
Every entity that uses this material gets a copy of the material (created through mtl_create) so then I can use the mtlSkills. Are there any drawbacks to this? I don't think a material takes alot of memory so storing one per entity wouldn't be a big deal.

Which one shall I go with?