Mammalian tongues are red because of haemoglobin. Blue/black colouration is due to the additional presence of melanin.
At the boundary between the epidermis and dermis are melanophores, cells that contain melanin. This brown pigment absorbs ultraviolet radiation from the sun that might otherwise damage the underlying dermal tissue. Melanin in the dark tongues of giraffes (Giraffa camelopardalis) protects the tissue from sunburn as the animals lift their heads into the top branches of trees to forage for leaves. In humans, synthesis of melanin increases upon exposure to sunlight and produces tanning. Extensions of melanophores reach into the epidermis where they inject their pigments into developing hair cells. In a few cases, such as the bright ischial callosities of baboons, pigmented patches of skin are used as visual signals. The blue and red coloration on the scrotum and perineal region of male vervets (Chlorocebus aethiops) is used in dominance displays.
From: Mammalogy: Adaptation, Diversity, Ecology by George A. Feldhamer, Lee C. Drickamer, Stephen H. Vessey and Joseph F. Merritt (2007) p 97 The Johns Hopkins University Press; 3rd edition edition