GSoC/GCI Archive
Google Code-in 2012 KDE

Marble: Make stars show colors in the stars plugin

completed by: Timothy Lanzi

mentors: Torsten Rahn, René Küttner, Dennis Nienhüser

Stars in the sky sometimes show different colors. Some are remarkable red, others blue and yet others yellow, orange or white.

In this task the stars plugin is supposed to get extended so that it displays these colors.

The key to this task is the so called color index:

http://en.wikipedia.org/wiki/Color_index

For reference there are some (B-V)-Color indexes listed here - including the supposed RGB value that they should get rendered with:

B-V value  Example                  Color             RGB value used in Marble (hex):

-0.23        Spica (Alp Vir)          blue               #a0b8f9

±0.00       Rigel (Bet Ori)          blue-white      #b9cbf9

+0.09       Deneb (Alp Ori)        white              #ffffff

+0.80       Capella  (Alp Aur)     yellow             #f8f9cc

+1.23       Arcturus (Alp Boo)    orange            #f8f0cc

+1,85       Betelgeuse (Alp Ori) red                 #ffe5d3

+2.35       Mu  Cep                  garnet red       #e8bc95

These B-V values can also be found in the catalog.dat file of the star catalog. One possible way to cover this task is to store a QColor/RGB value during the creation of the stars.dat file from the catalog.dfür 360°at file. The RGB value would get created taking the table above as a reference: either the RGB value of the "nearest neighbor" in terms of B-V color index would be stored. Or the RGB value could be interpolated between the two closest B-V color index stars above.

In the end the stars plugin should show all stars in color.

The most naive approach (with good results) would always draw the RGB color that is closest to the B-U color value (without doing interpolation).