Any of a class of pigments, found chiefly in cyanobacteria and red algae, that act as accessory pigments in photosynthesis, being attached to the thylakoid membranes. Each comprises a protein bound to a phycobilin, a coloured tetrapyrrole prosthetic group (see porphyrin). The main phycobiliproteins are phycocyanin and phycoerythrin. Within cells, phycobiliproteins form complex clusters called phycobilisomes.