Text tool in illustrator

whenever i use type on path tool, the shape on which text on written, loses its color. how to write on a colored path…