🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sci.astro
Article #4112

Re: Spectral type -> RGB colors

#4112
From: Phil Dykstra <phil>
Date: Mon, 20 Apr 1987 00:59
51 lines
2637 bytes
Here's the method I used:

The Yale catalog gives the B-V color index, I.
I converted these to color temperatures:

Tc = 7200 / (I + 0.64)  in degrees K

and then integrated Planck's black body radiation curve for
several temperatures against the CIE standard observer color
matching curves.  I converted these to xy chromaticity
coordinates.  Here's a table of some values with a set of
equal intensity RGB value for a "typical" monitor [Note that
in order to display a color "correctly" one needs to know the
gamma and phosphor chromaticities of their display device
and convert xy to match.  These make a BIG difference.]

Temp    xy chrom coords         Monitor RGB

 3000   0.4373  0.4042          212 106  31
 4000   0.3808  0.3770          173 117  65
 5000   0.3454  0.3518          151 122  96
 6000   0.3223  0.3320          137 124 121
 8000   0.2954  0.3050          122 126 159
10000   0.2808  0.2885          113 126 185
12000   0.2719  0.2778          109 126 203
15000   0.2638  0.2675          104 125 222
20000   0.2565  0.2578          100 124 241

The resulting colors look exaggerated, particularly at the
high end, but this is mostly due to the fact that the eye's
perception of color from a point source is very poor.  A
star is a much better point source than a pixel on a frame
buffer.  Looking at a "defocused" photograph of stars
will show that these colors are actually out there!
I have not determined a way to "correct" the colors for
this psycho-physical effect (other than pure cheating).

As for the brightness of the displayed pixels, most
monitors have a gamma near 2.5, and will therefore do a
nearly correct exponential magnitude->brightness mapping
for you!  Thus do a linear mapping of say, mag 6 through
-1, onto 1->255.

You could probably work from the spectral class as well,
but as long as you have a B-V value the above method is
probably easier.  It's fun by the way to make an HR
diagram from the Yale data.

- Phil
<phil@brl.arpa>
seismo!brl-smoke!phil
Technical Details
Message-ID: <5776@brl-smoke.ARPA>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!brl-adm!brl-smoke!phil
References: <2360@cit-vax.Caltech.Edu>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!brl-adm!brl-smoke!phil
From: phil@brl-smoke.ARPA (Phil Dykstra <phil>)
Newsgroups: sci.astro,comp.graphics
Subject: Re: Spectral type -> RGB colors
Message-ID: <5776@brl-smoke.ARPA>
Date: Sun, 19-Apr-87 19:59:21 EST
Article-I.D.: brl-smok.5776
Posted: Sun Apr 19 19:59:21 1987
Date-Received: Sun, 19-Apr-87 23:38:33 EST
References: <2360@cit-vax.Caltech.Edu>
Reply-To: phil@brl.arpa (Phil Dykstra <phil>)
Distribution: world
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 51