12
$\begingroup$

In other words, what is the limit of the rgb values of color temperature as temperature approaches infinity? Put differently, what is the terminal point of the Planckian locus? Is there an exact value?

There is definitely an answer, since it the point (infinite color temperature) is labeled on chromaticity diagrams- I am wondering how the rgb value of the point is found.

$\endgroup$
5
  • $\begingroup$ You would have to approximate a $\nu^2$ spectrum, but I doubt that conventional displays can do that well, with any choice of RGB value and any display calibration. The "color" is probably far outside the gamut of most devices. $\endgroup$
    – CuriousOne
    Commented Sep 18, 2015 at 7:30
  • 3
    $\begingroup$ I'm voting to close this question as off-topic because it's about looking up a color code value, not about physics. $\endgroup$
    – ACuriousMind
    Commented Sep 18, 2015 at 12:03
  • $\begingroup$ @CuriousOne You don't have to approximate a $\nu^2$ spectrum, you only have to calculate how your eye responds to the spectrum. And there really are no colors that are "far beyond" the gamut available to common displays, although "far beyond" is subjective. There are colors that are not available, but they differ in perception only slightly (again a subjective judgment) from available colors. $\endgroup$
    – garyp
    Commented Sep 18, 2015 at 14:59
  • $\begingroup$ @garyp: That's what I meant. You need to create an RGB approximation of that spectrum, which is not exactly the same. Take a look at the problems to actually create a pure color spectrum, the errors are huge! The situation is not as bad as I thought in this case because all channels are similar. The color is pretty boring, so to speak, so we are only dealing with quantization effects. $\endgroup$
    – CuriousOne
    Commented Sep 18, 2015 at 15:27
  • 1
    $\begingroup$ It looks like no one has linked to the Wikipedia page on Planckian locus that answers this question in the CIE 1960 color space. $\endgroup$ Commented Jul 14, 2018 at 20:19

5 Answers 5

10
$\begingroup$

If you make the temperature very, very high (say $>10^{5}$ K) then the visible part of the spectrum lies in the Rayleigh-Jeans tail of the Planck spectrum.

Thus: $$B_{\nu} \simeq \frac{2\nu^2 kT}{c^2},$$ and the approximation becomes better and better as $kT \gg h\nu$. The equivalent expresson per unit wavelength interval is $$B_{\lambda} \simeq \frac{2c kT}{\lambda^4}$$

The general problem of converting from a spectrum to RGB values is discussed here. This involves doing an integration of the spectrum, weighted by visual perception sensitivity and then converting the resulting sums into RGB values. The process is described in some detail here.

No example is given for a very hot blackbody, though some tools are provided (C programs). However, I find this site has already done the calculations for blackbodies up to 30,000K (which is probably close to an asymptotic limit and gets RGB=#9fbfff (159,191,255).

Here is a plot of RGB values versus blackbody temperature from Tanner Helland. that seems to agree closely with this result (maybe 152,185,255 at 40,000 K) and where you can see the asymptotic behaviour.

Temperature vs RGB values (from Tanner Helland)

Further edit: Wolfram Alpha has a calculator that goes up to 90,000K. This yields an RGB of 153.7,176.7,255, but given that the RGB for 30,000K is identical, I'm not sure I trust these exact values. In any case, the image below is what this looks like (courtesy of Emilio Pisanty).

Colour of a very hot blackbody.

$\endgroup$
2
  • $\begingroup$ Best answer on this thread. Consider adding in this png of the final RGB values you quote. Subject to the usual uncertainties in what the display will look like, but it gives a good general idea. Also it neglects the fact that the object would be very, very painfully bright. $\endgroup$ Commented Sep 18, 2015 at 12:07
  • 2
    $\begingroup$ Note that 90,000 K is about 11 mireds from T = ∞, which is a small but noticeable difference. It would seem that 10 mireds is about the smallest difference a photographer may care about: From the collection of Kodak's color correction filters, the least correcting blue filter (Wratten 82) is −10 mireds. My DSLR allows me to manually adjust the white balance, and this adjustment works also in steps of 10 mireds. $\endgroup$ Commented May 10, 2017 at 19:47
4
$\begingroup$

The RGB color value of an infinitely hot blackbody approaches a very pale blue as temperature increases. This theoretical limit is calculated using blackbody radiation principles and color science. Below is a detailed explanation and Python code that illustrates this process.

Key References:

  1. SI Brochure: Provides constants for Planck's law.
  2. CIE XYZ CMFs (2006): Essential for converting blackbody spectra into CIE XYZ values.
  3. XYZ to RGB Transformation Matrix: Converts XYZ to linear RGB.
  4. Gamma Correction Function: Adjusts linear RGB values to match typical display characteristics.
  5. Baby Universe (#8bb1ff): The calculated color for extremely high temperatures, roughly rgb(139, 177, 255).

Python Implementation:

The following Python code calculates the RGB value for a blackbody at an extremely high temperature (e.g., (10^7) K). The result is a pale blue, indicative of the color limit as temperature approaches infinity.

import requests
from io import BytesIO
import numpy as np
import pandas as pd
from mpmath import mp, mpf, exp
import matplotlib.pyplot as plt

# Set the precision to 7 decimal places
mp.dps = 7

# High precision constants for Planck's law using exact values
h = mpf("6.62607015e-34")  # Planck constant (J·s)
c = mpf("299792458")  # Speed of light in vacuum (m/s)
k = mpf("1.380649e-23")  # Boltzmann constant (J/K)

# Load CIE XYZ data
csv_response = requests.post(
    url="http://www.cvrl.org/xyzcmfrequest_2.php",
    data={"xyz_steps": "fine", "xyz_format": "csv", "button": "Submit"},
)
cie_xyz_data = pd.read_csv(BytesIO(csv_response.content))  # 7 significant figures
wavelengths = (
    cie_xyz_data.iloc[:, 0].values.astype(float) * 1e-9
)  # Convert nm to meters
X_values = cie_xyz_data.iloc[:, 1].values
Y_values = cie_xyz_data.iloc[:, 2].values
Z_values = cie_xyz_data.iloc[:, 3].values

# Transformation matrices for RGB to XYZ and XYZ to RGB
matrix_XYZ_to_RGB = np.array(
    [
        [3.240969941904523, -1.537383177570094, -0.498610760293003],
        [-0.969243636280880, 1.875967501507721, 0.041555057407176],
        [0.055630079696994, -0.203976958888977, 1.056971514242879],
    ]
)

def plot_rgb_square(rgb):
    """Plots a square filled with the specified RGB color and labels it with the RGB values."""
    normalized_rgb = [x / 255.0 for x in rgb]
    square = np.ones((10, 10, 3)) * normalized_rgb
    plt.imshow(square)
    plt.axis("off")
    rgb_text = f"rgb({round(rgb[0])}, {round(rgb[1])}, {round(rgb[2])})"
    plt.text(
        5,
        5,
        rgb_text,
        color="white" if sum(rgb) < 400 else "black",
        fontsize=12,
        ha="center",
        va="center",
        weight="bold",
    )
    plt.show()


def blackbody_spectrum(wavelengths, temperature):
    """Calculate the blackbody spectrum using mpmath for arbitrary precision."""
    return (2 * h * c**2 / wavelengths**5) / (
        exp(h * c / (wavelengths * k * temperature)) - 1
    )


def temperature_to_xyz(temperature):
    """Convert a temperature in Kelvin to CIE XYZ values using mpmath."""
    spectrum = np.array([blackbody_spectrum(w, temperature) for w in wavelengths])

    # Integrate the spectrum with the CIE XYZ color matching functions
    X = np.trapezoid(spectrum * X_values, wavelengths)
    Y = np.trapezoid(spectrum * Y_values, wavelengths)
    Z = np.trapezoid(spectrum * Z_values, wavelengths)

    # Normalize by Y to obtain chromaticity values
    XYZ = np.array([X, Y, Z])
    XYZ_normalized = XYZ / XYZ.sum()

    return XYZ_normalized


def xyz_to_rgb(XYZ):
    """Convert CIE XYZ values to linear RGB using the transformation matrix."""
    RGB = np.dot(matrix_XYZ_to_RGB, XYZ)

    # Clip and normalize RGB values
    RGB = np.clip(RGB, 0, None)
    RGB /= RGB.max()

    return RGB


def gamma_correct(rgb):
    """Apply gamma correction based on the sRGB transfer function."""
    corrected_rgb = np.where(
        rgb <= 0.0031308, 12.92 * rgb, 1.055 * np.power(rgb, 1 / 2.4) - 0.055
    )
    return np.clip(corrected_rgb, 0, 1)


def temperature_to_rgb(temperature):
    """Convert a temperature in Kelvin to RGB color using mpmath and the sRGB transfer function."""
    XYZ = temperature_to_xyz(temperature)
    linear_rgb = xyz_to_rgb(XYZ)
    sRGB = gamma_correct(linear_rgb)
    return np.round((sRGB * 255).astype(float))

# Calculate the RGB value for a very high temperature (e.g., 1e7 K)
color_largest_temp = temperature_to_rgb(mpf("1e7"))

print(f"rgb({', '.join(map(str, map(round, color_largest_temp.tolist())))})")
# rgb(139, 177, 255)
plot_rgb_square(color_largest_temp)

Baby Universe Blue #8bb1ff

Result:

This script computes the RGB value for an extremely hot blackbody as rgb(139, 177, 255), a blue-white color. This result represents the theoretical color limit on the Planckian locus as temperature approaches infinity.

$\endgroup$
1
$\begingroup$

By using the spreadsheet at http://www.brucelindbloom.com/index.html?Calc.html I am getting Apple RGB values of (110,150,242), which on my screen is a purplish blue.

$\endgroup$
0
$\begingroup$

Take two wavelengths $\lambda_1 < \lambda_2$ and use the Planck's law for the spectral radiance.

$$u(\lambda, T) = \frac{2hc^2}{\lambda^5}\frac{1}{e^\frac{hc}{\lambda k T} - 1}$$

Then lets take the fraction of the two intensities

$$\frac{u(\lambda_2, T)}{u(\lambda_1, T)} = \frac{\lambda_1^5}{\lambda_2^5} \frac{e^\frac{hc}{\lambda_2 k T} - 1}{e^\frac{hc}{\lambda_1 k T} - 1}$$

For infinitely hot blackbody you have to take a limit.

$$\lim_{T \to \infty}\frac{u(\lambda_2, T)}{u(\lambda_1, T)} = \frac{\lambda_1^6}{\lambda_2^6}$$

(See here.)

So, the spectrum will follow the 6-power law. That, among other things, means that for every amount of energy that $\lambda_1=700 nm$ light releases on your retina, the $\lambda_2=7 nm$ X-ray will release $10^{12}$ times more. So, converting that to RGB -- I dont think that makes much sense, since your eyes are going to be burnt.

$\endgroup$
3
  • 1
    $\begingroup$ The RGB values correspond to the visual part of the spectrum. The Planck function approximates to $\lambda^{-4}$ in these circumstances. When $kT\gg hc/\lambda$ the exponential can be expressed as a linear approximation to get this result. Your limit is not right. $\endgroup$
    – ProfRob
    Commented Sep 18, 2015 at 11:15
  • 1
    $\begingroup$ This has been upvoted despite actually being edited to be more incorrect since my original comment. The correct limit is $\lambda_{1}^{4}/\lambda_{2}^{4}$ ... And whilst the blackbody would be bright you can always look at it from a long way away... like a star. $\endgroup$
    – ProfRob
    Commented Sep 18, 2015 at 15:36
  • $\begingroup$ The reason it is incorrect is not how you have evaluated the limit, but that you have started with the wrong expression for $u$. The exponential terms should be the other way around. $\endgroup$
    – ProfRob
    Commented Sep 19, 2015 at 20:18
-2
$\begingroup$

The higher the temperature, the more the peak wavelength of the radiation shifts towards higher frequencies. At higher and higher temperatures, the peak will be blue, then ultraviolet, before it shifts into X-rays and finally gamma rays.

From this you would expect that at infinite temperature, the frequency would also be infinite. In reality of course, long before it gets that high, the energy of the emitted quanta will disrupt space, as well as the black body, hence limiting itself. As a guess, when the wavelength becomes equal to the Planck length ($10^{-35}m$) the photon may collapse into a black hole. This happens when the energy reaches about $10^{19}GeV$. The frequency at that point is $3*10^{43}Hz$.

Either way, the radiation will no longer be describable in terms of RGB, as the frequencies involved will be vastly higher than those of visible light.

$\endgroup$
1
  • 5
    $\begingroup$ Even though the peak is far outside the visible part of the spectrum, there will still be plenty of light in the visible to create a color, as addressed by Rob Jeffries. $\endgroup$
    – pela
    Commented Feb 10, 2018 at 23:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.