The ancient Maya sourced their dyes from plant, mineral and animal as well as insect sources across their world, such as brazilwood, indigo, avocado and the cochineal. Dyers would prepare the dye substances by crushing them in bowls -- mordants included tempate (Jatropha curcas) leaf extract or rosemary (though Mayan Weaving: A Living Tradition speaks of urine).
Various sources existed from which the ancient Maya made red dye. These included brazilwood, the cochineal and annatto (achiote). Brazilwood is a kind of tree -- of which its wood was used for the dye --, while cochineal -- Dactilopius coccus -- is an insect that likes to eat prickly pear cactus. As for annatto -- still used today to color cheese --, the ancient Maya used the seeds of this evergreen shrub (or tree).
The fruit of the avocado plant provided the ancient Maya with a nutritious food. Other than its culinary application, the fruit also was used to dye cloth green.
The ancient Maya used the blackberry plant (but not the berry) to make yellow dye.
Found in both the Old World as well as the New World, the ancient Maya used the indigo plant to make a blue dye. According to Maya Weaving: A Living Tradition they also used a kind of clay to make a blue cloth -- however it doesn't elaborate as to whether or not it is the same long-lasting blue used in Maya ceramics.
Multiple sources were available to the ancient Maya to make purple dye. This included blackberries, the wood of the logwood and a variety of mollusk. Blackberries made a deep purple dye and logwood wood made a black-purple dye, but the ancient Maya mollusk dye deserves a separate paragraph.
When it comes to the mollusk the ancient Maya used -- and the color it made -- resources aren't always specific, except for Encyclopedia of American Indian Contributions to the World and Archaeology of Ancient Mexico and Central America. The former states the ancient Maya used ink from the gland of Purpura patula (a kind of mollusk) as a purple dye of a lavender shade. Conversely, the latter states the ancient Maya used Purpura pansa.
Several sources say that black dye for the ancient Maya came from coal. However, Encylcopedia states the ancient Maya obtained their black dye from genipa seeds.
Looking up genipa on the Free Dictionary revealed this was a general name for trees in the Genipa genus that bloom yellow flowers and produce fruit with a thick rind that can be eaten. According to Perdue University, a species of genipa (Genipa americana, commonly the genipap) grows -- among other places -- in southern Mexico. It is possible that it is this genipa the ancient Maya used to make black dye.
Consideration: Cacao Seeds
In Victoria Schlesinger's Animals and Plants of the Ancient Maya: A Guide -- published by University of Texas Press -- the ancient Maya also used cacao seeds to make a dye. However, I have yet to find more information on this, such as how they prepared the seeds and what color the dye was.
"Handbook To Life In The Ancient Maya World"; Lynn V. Foster; 2005
"The Ancient Maya"; Robert J. Sharer, Loa P. Sharer; 2006
"The Ancient Maya: Fifth Edition"; Sylvanus Griswold Morley, Robert J. Sharer; 1994
"Your Travel Guide to Ancient Mayan Civilization"; Nancy Day; 2001
"Plants of the Ancient Maya: A Guide"; Victoria Schlesinger; 2001
"Mayan Weaving: A Living Tradition"; Ann Stalcup; 1999
"Encyclopedia of American Indian Contributions to the World: 15,000 Years of Inventions and Innovations"; Emory Dean Keoke, Kay Marie Porterfield; 2009
The Free Dictionary: Genipa
Perdue University Center for New Crops & Plant Products: Genipap
"Archaeology of Ancient Mexico and Central America: An Encyclopedia"; Susan Toby Evans, David L. Webster; 2001