Star radiate different colors and lines based on their composition this is know as its?

It sounds like you're describing an emission spectrum. An emission spectrum will contain bright lines at specific colors, each of which is characteristic of a particular chemical element.