Mostly hydrogen and helium.
What elements the star is made of.
Stars derive their colours from the elements present.
Spectrometers are used for this. By looking at the spectrum of light coming from the star, scientists can tell which elements are in the star by the pattern of lines that are known to be associated with certain elements.
Objects are not made of forces. A star is made of hydrogen, helium and, later in its life, heavier elements.
Stars are made from a lot of different elements, but when they are done they are mainly hydrogen and helium.
STAR
Our Sun is about 70% Hydrogen and 28% Helium by mass, with traces of heavier elements. Other stars can be a little different, but with a spectrometer, scientists are able to determine the elements that are present in any star.
By looking at the lines in a star's spectrum of light, astronomers can tell what kinds of elements the star is made of. This happens because when a beam of light hits an atom or molecule, that atom absorbs a characteristic wavelength (color) of visible light. Scientists have made a huge list of different elements and the different patterns of lines observed in theirj corresponding "spectra" (fancy word for light spectrums), and by using such lists can deduce precisely what each star is made of.
Hydrogen and helium are the most abundant elements in a star.
All stars are made primarily of hydrogen, with lesser amounts of helium and trace amounts of heavier elements. The precise composition of each star is a little different, depending on the mass and age of the star.
Most stars are made of gases, primarily hydrogen and helium, though many stars also contain small quantities of heavier elements.
Hydrogen and helium are the most abundant elements in a star.