<p>So I use the following logic:</p>
<ol>
<li>Define 'red', 'green' and 'blue' light in terms of the wavelength ranges those colours encompass (from <a href="https://en.wikipedia.org/wiki/Visible_spectrum#Spectral_colors" rel="nofollow noreferrer">here</a>)</li>
<li>Calculate the average <a href="https://en.wikipedia.org/wiki/Planck%27s_law#The_law" rel="nofollow noreferrer">spectral radiance</a> across each wavelength range, for a defined temperature</li>
<li>Define the RGB value to be the relative ratios of each colour's spectral radiance with 255 defined as the colour with the largest spectral radiance</li>
</ol>
<p><em><strong>I made a Python script which you can find <a href="https://gofile.io/d/8djhHo" rel="nofollow noreferrer">here</a> to calculate, display and show the appearance of the corresponding RGB value</strong></em>. Within the script, just change the value of the <code>stellar_temperature</code> variable to see the RGB values of stars of different temperatures.</p>
<p>The script is then finished off with a simple plot to show the appearance of that RGB value.</p>
<p>Now there are a couple of assumptions of course:</p>
<ol>
<li>RGB values can be defined in terms of radiance/luminosity/flux ratios at each wavelength... This obviously breaks down if you have a detector which gets saturated at certain flux levels! I presume the human eye might fit that description.</li>
<li>Stars can be modelled by perfect blackbody spectra. I believe this to be a pretty valid assumption when the accuracy level needed is differentiation of different RGB tones...</li>
<li>No foreground extinction/absorption by atmosphere/dust etc.</li>
</ol>

CC BY-SA 4.0
2020-12-02T22:28:16.340Z
Okay, so when I ran the program, temperatures below 1000 K appeared bright red (255,0,0) no matter what. This seems like a bug; normally, it would fade to black. Can you update your program to correct this issue?
Also, the colors seem inaccurate compared to actual values, shown [here](http://www.vendian.org/mncharity/dir3/blackbody/UnstableURLs/bbr_color.html).
WarpPrime
CC BY-SA 4.0
2020-12-03T11:40:22.130Z
So I believe the ratios of the intensities are handled differently in the reference you sent on. While in the script I initially uploaded, the intensity (and therefore R:G:B) ratios are handled linearly, the reference you sent handles them logarithmically. I will upload a revised version (still ironing some things out) of the script to let you choose. However, the reference also mentions 'gamut' correction which I am unfamiliar with as a non-colour-techie person! The logarithmic-ratio based colours are certainly much closer to those of the reference you sent on anyways...
simonp2207
CC BY-SA 4.0
2021-04-30T22:06:19.270Z
Brown dwarfs are *nothing* like blackbodies.
ProfRob
CC BY-SA 4.0
2021-05-03T13:01:31.953Z
How would you describe their spectra? If you include any absorption lines (of which I'm sure there's plenty), you aren't approximating any more, imo.
simonp2207
CC BY-SA 4.0
2021-05-10T12:05:33.270Z
There are approximations and things which are completely wrong.
ProfRob
CC BY-SA 4.0
2021-05-12T09:14:21.413Z
Perhaps you could give a reference with the spectral profile of brown dwarves in general?
simonp2207
CC BY-SA 4.0
2021-08-29T07:54:27.280Z
You can just search for "brown dwarf spectrum" or "T dwarf spectrum" to see many examples.
ProfRob
CC BY-SA 4.0
2020-12-01T12:53:37.757Z
2020-12-01T13:28:43.393Z
2020-12-01T13:28:43.393Z
simonp2207
<p>We know the colors of stars that have a temperature greater than 1000-1500 K, shown <a href="http://www.vendian.org/mncharity/dir3/blackbody/UnstableURLs/bbr_color.html" rel="nofollow noreferrer">here.</a> However, I am wondering about those stars/brown dwarfs with surface temperatures of less than 1500 K. Is there a blackbody curve for these temperatures, and are there any set RGB values for them?</p>

CC BY-SA 4.0
2020-11-30T23:14:51.133Z
Color is hard.  Did you look at https://github.com/anisotropela/Universe-timeline/blob/master/timeline.py (by Pela of this parish)   This is close to a duplicate of your previous quesion https://astronomy.stackexchange.com/questions/39994/what-is-the-rgb-curve-for-blackbodies
James K
CC BY-SA 4.0
2020-11-30T23:47:41.250Z
Such objects are nowhere near blackbodies.
ProfRob
<star><temperature><black-body>
Blackbody curve in RGB for objects less than 1500 K?
WarpPrime
# Blackbody curve in RGB for objects less than 1500 K?

(Asked by: username_0 on 2020-11-30)

We know the colors of stars that have a temperature greater than 1000-1500 K, shown [here.](http://www.vendian.org/mncharity/dir3/blackbody/UnstableURLs/bbr_color.html) However, I am wondering about those stars/brown dwarfs with surface temperatures of less than 1500 K. Is there a blackbody curve for these temperatures, and are there any set RGB values for them?

**Tags:** star, temperature, black-body
> **Comments:**
> **username_1**: Color is hard.  Did you look at https://github.com/anisotropela/Universe-timeline/blob/master/timeline.py (by Pela of this parish)   This is close to a duplicate of your previous quesion https://astronomy.stackexchange.com/questions/39994/what-is-the-rgb-curve-for-blackbodies  
> **username_2**: Such objects are nowhere near blackbodies.  

---

## 1 answers

### Answer by username_3 on 2020-12-01. Score: -1

So I use the following logic:

1. Define 'red', 'green' and 'blue' light in terms of the wavelength ranges those colours encompass (from [here](https://en.wikipedia.org/wiki/Visible_spectrum#Spectral_colors))
2. Calculate the average [spectral radiance](https://en.wikipedia.org/wiki/Planck%27s_law#The_law) across each wavelength range, for a defined temperature
3. Define the RGB value to be the relative ratios of each colour's spectral radiance with 255 defined as the colour with the largest spectral radiance

***I made a Python script which you can find [here](https://gofile.io/d/8djhHo) to calculate, display and show the appearance of the corresponding RGB value***. Within the script, just change the value of the `stellar_temperature` variable to see the RGB values of stars of different temperatures.

The script is then finished off with a simple plot to show the appearance of that RGB value.

Now there are a couple of assumptions of course:

1. RGB values can be defined in terms of radiance/luminosity/flux ratios at each wavelength... This obviously breaks down if you have a detector which gets saturated at certain flux levels! I presume the human eye might fit that description.
2. Stars can be modelled by perfect blackbody spectra. I believe this to be a pretty valid assumption when the accuracy level needed is differentiation of different RGB tones...
3. No foreground extinction/absorption by atmosphere/dust etc.

> **Comments:**
> **username_0**: Okay, so when I ran the program, temperatures below 1000 K appeared bright red (255,0,0) no matter what. This seems like a bug; normally, it would fade to black. Can you update your program to correct this issue? Also, the colors seem inaccurate compared to actual values, shown [here](http://www.vendian.org/mncharity/dir3/blackbody/UnstableURLs/bbr_color.html).  
> **username_3**: So I believe the ratios of the intensities are handled differently in the reference you sent on. While in the script I initially uploaded, the intensity (and therefore R:G:B) ratios are handled linearly, the reference you sent handles them logarithmically. I will upload a revised version (still ironing some things out) of the script to let you choose. However, the reference also mentions 'gamut' correction which I am unfamiliar with as a non-colour-techie person! The logarithmic-ratio based colours are certainly much closer to those of the reference you sent on anyways...  
> **username_2**: Brown dwarfs are *nothing* like blackbodies.  
> **username_3**: How would you describe their spectra? If you include any absorption lines (of which I'm sure there's plenty), you aren't approximating any more, imo.  
> **username_2**: There are approximations and things which are completely wrong.  
> **username_3**: Perhaps you could give a reference with the spectral profile of brown dwarves in general?  
> **username_2**: You can just search for "brown dwarf spectrum" or "T dwarf spectrum" to see many examples.  

---

