# The color of the Moon and the Sun from space in terms of RGB and color temperature

It would seem that the question of the color of the Moon and the Sun from space for modern science is so simple that in our century there should be no problem at all with the answer. We are talking about colors when observing precisely from space, since the atmosphere causes a color change due to Rayleigh light scattering. «Surely somewhere in the encyclopedia about this in detail, in numbers it has long been written,» you will say. Well, now try searching the Internet for information about it. Happened? Most likely no. The maximum that you will find is a couple of words about the fact that the Moon has a brownish tint, and the Sun is reddish. But you will not find information about whether these tints are visible to the human eye or not, especially the meanings of colors in RGB or at least color temperatures. But you will find a bunch of photos and videos where the Moon from space is absolutely gray, mostly in photos of the American Apollo program, and where the Sun from space is depicted white and even blue.

Especially my personal opinion is nothing but a consequence of the intervention of politics in science. After all, the colors of the Moon and the Sun from space directly relate to the flights of Americans to the Moon.

I searched through many scientific articles and books in search of information about the color of the Moon and the Sun from space. Fortunately, it turned out that even though they do not have a direct answer to RGB, there is complete information about the spectral density of the solar radiation and the reflectivity of the Moon across the spectrum. This is quite enough to get accurate colors in RGB values. You just need to carefully calculate what, in fact, I did. In this article I will share the results of calculations with you and, of course, I will tell you in detail about the calculations themselves. And you will see the Moon and the Sun from space in real colors!

I carried out the calculations in the Mathcad program and, accordingly, the code fragments will be in the built-in programming language, which is quite suitable as understandable for all pseudo-code.

At the same time I will tell you in detail what is the RGB color model, with which, I think, you are all familiar. This question is also not entirely simple. For example, try to answer the following two questions. Let the color be set to rgb(120,80,100).
1) What values of RGB has a color that is 2 times darker than the specified?
2) What are the values of RGB in gray with the same brightness as the specified?
It would seem that there is thinking, divided by 2 in the first case, i.e. rgb(60,40,50) and averaged in the second case, i.e. rgb(100,100,100). Alas, the correct answers are: 1) rgb(86,56,71); 2) rgb(92,92,92). You will find out why the answers are just like that.

Also talk about the color temperature and how to calculate it.

## XYZ color space

XYZ is a reference color model, defined in the strict mathematical sense by the CIE (International Commission on Illumination) International Organization for Illumination in 1931. Model CIE XYZ is a master model of almost all other color models used in technical areas. XYZ color is set as follows:

where — the spectral density of any energy photometric value (for example, radiation flux, energy brightness, etc., in absolute or relative terms) over the wavelength range from 390 to 830 nm (this is according to 2006, in 1931 the range was from 380 to 780 nm); , , — color matching functions. Moreover, what is important for us, the Y coordinate corresponds to the visual brightness of the signal.

I downloaded these color matching functions from here: [1]. There, the color matching functions are defined for a 2-degree and 10-degree field of view. I decided to carry out calculations for both cases, compare the results and make sure that, as one would expect, the color coordinates differ slightly. Naturally, I used the data of the functions with the maximum resolution of those provided, that is, with a step of 0.1 nm. Graphs of color matching functions are as follows:

From the graphs it can be seen that above 710 nm, the functions become negligible in the sense that when observing colors close to white, the spectral density on the range above 710 nm makes almost no contribution. Although we know that visible light lies in the range up to 780 nm, but we must understand that this is with monochromatic radiation. I have all this to the fact that in calculations I had to extrapolate in some cases the missing data on the reflectivity of the Moon just for the range where the functions of color matching are essentially small. Therefore, a possible extrapolation error does not lead to a noticeable error in the calculated colors.

I compute the above integrals by the trapezoidal rule:

where c – is the coordinate number of the color space (1, 2, 3 for X, Y, Z respectively); cw – is a table of color matching functions; f – is the spectral density; M=(830-390)/0.1=4400 – the number of grid steps.

The correct color matching functions have the property that the area under all three curves is the same:

This is done so that the uniform spectrum has the same XYZ coordinate values. Check if this property holds:

where «one» – is an array of 1; cmf2_ and cmf10_ – are color matching function tables for 2-degree and 10-degree field of view, respectively. As you can see, the property is performed with approximately 0.01% accuracy, which is quite good. But still, renormalize the functions for fidelity:

## Brightness normalization

Consider the work of a digital camera. The main element of a digital camera is a matrix, which consists of photosensors. When an image is projected onto a matrix, an electric charge is accumulated in each of its photosensors, which is proportional to the radiation energy of the photosensor. Photosensors capture the brightness of the image element, without carrying any information about its color. For information about the color the matrix of photosensors covered on top by miniature filters. These filters perform the role of color matching functions. Each pixel consists of several photosensors, which are combined in the amount of various light filters.

Thus, as a function we should take the spectral density of the radiation energy of one pixel. Such a spectral density can be represented as

where illumination – is the spectral density of the light source; albedo – the reflectivity of the surface of the photographed object; coef – is a certain constant coefficient, which is determined by the exposure time, aperture, distance from the light source to the object being photographed and other factors. Reflectance refers to the visible albedo, which is defined as the ratio of the brightness of a flat surface element illuminated by a parallel beam of rays to the brightness of the absolutely white surface located perpendicular to the rays.

Now imagine that we are doing the work of the photoexposure meter, with which the photographer sets the shutter speed and aperture on the camera. In other words, we need to choose a coef value so that the image is normal in brightness, not too dark, not too bright. Imagine that there is the absolutely white screen behind the object being photographed. The reflectivity albedo of such a screen is by definition equal to 1 at all wavelengths. Set the value of coef so that the visual brightness Y of this screen is equal to 1. Why 1? Because in the RGB color model, the maximum possible brightness value is 1, which is achieved with rgb(255,255,255), that is, with white. I will tell about it a little later. Since normal bodies are darker in color than the absolutely white screen, images will be normal in brightness. From these considerations, we get the following expression for coef:

It should be noted that such a normalization does not guarantee that the value of each RGB coordinate will be less than or equal to 255. For example, if you photograph the absolutely white screen with a red light source, then the RGB color will go off the scale.

So, I calculate the coordinate values of the XYZ color space as follows:

We need to somehow express the color of the Sun. We cannot photograph it directly, and in our mathematical model we have not foreseen such an extreme case. Obviously, we need to photograph the absolutely white surface illuminated by the Sun. Since the Sun from space has a reddish tint, then, as I said, the color of the absolutely white screen goes off the scale. Therefore, we must take the surface darker. I empirically found that we must take white paper with an albedo of 0.91. More albedo cannot be taken, begins to go off the scale. So in order to get the color of the Sun, I simply set the albedo value to 0.91 at all wavelengths in the above formula:

## sRGB color space

The most common color space using the RGB model is sRGB. Therefore, when they talk about RGB without clarification, it is the sRGB color space that is the standard for representing the color spectrum using the RGB model. This standard was created by the International Color Consortium (ICC) in 1996 to unify the use of the RGB model in monitors, printers and Internet sites. Let's analyze this standard, the description of which is available at [2].

The conversion of XYZ to sRGB takes place in three stages. First, XYZ coordinates are converted to linear RGB coordinates, then linear coordinates are converted to non-linear RGB coordinates, and at the end non-linear coordinates are converted to 8-bit RGB coordinates, which, in fact, are the coordinates of the sRGB color space.

The conversion of XYZ coordinates to linear RGB coordinates is as follows:

and the opposite is:

I wonder where did these strange numbers come from in square matrices? And they came from the recommendation of ITU-R BT.709 [3]. Denote the first square matrix by XYZ_to_RGB, and the second by RGB_to_XYZ. Obviously, they are mutually inverse. Recommendation ITU-R BT.709 specifies the requirements to the second matrix. From these requirements, you can uniquely calculate the second matrix, and the first is equal to the inverse matrix of the second.

We introduce the following functions:

Then the requirements of recommendations ITU-R BT.709 take the following form:

We have 8 equations, when we have 9 unknown elements of the RGB_to_XYZ matrix, i.e. one more equation is missing. And missing equation is given implicitly, I had to guess before it myself. The essence of this equation is that for white color, the visual brightness Y should be equal to 1:

I found the exact solution of these equations in rational numbers:

If you round the numbers in my result to four decimal places after the dot, you get those weird numbers in the standard of the International Color Consortium. In my calculations, I use not rounded matrices, but the above-mentioned exact ones (as far as floating-point numbers with double precision allow).

So, the linear coordinates of RGB based on the table of color matching functions (cmf), spectral radiation density (illumination) and reflectivity (albedo) I calculate as follows:

I also use linear coordinates RGB, averaged over the 2-degree and 10-degree field of view:

From the linear coordinates of RGB, the visual brightness Y is calculated using the following formula (by default, Mathcad arrays are numbered starting from the zero element):

We continue to disassemble the standard. Each linear coordinate of the RGB is converted to nonlinear using the nonlinear function lin2bit, and back to bit2lin, which are defined as follows:

The graphs of these functions look like this:

Note that 0 is converted to 0, 1 to 1.

At the end, the non-linear coordinates of RGB are converted to 8-bit by multiplying by 255, followed by rounding to integer numbers.

Thus, I defined the following functions for converting linear RGB coordinates to 8-bit and back:

Now we are ready to solve the problem from the introduction. I remind the condition.

Let the color be set to rgb(120,80,100).
1) What are the values of RGB has a color that is 2 times darker than the specified?
2) What are the RGB values for gray with the same brightness as the given one?

Solution:

## Color temperature

The color temperature of the light source, measured in Kelvin, is determined by the temperature of the blackbody located on the color chart in the same place as the radiation source under consideration. If the light source does not fall on the Planck curve (a curve that is determined by the set of color points of a blackbody at different temperatures), a correlated color temperature is used to characterize it. This value is also measured in Kelvin is determined by the temperature of a blackbody, whose color is as close as possible to the color of the light source. To find the correlated color temperature of the radiation source on the color chart constructed in (u,v) coordinates, the point closest to the source on the Planck curve is determined (i.e., the shortest geometrical distance). The temperature of a blackbody located at this point will correspond to the correlated color temperature of the source under consideration [4].

For a blackbody of temperature T, the radiation power per unit area of the radiating surface in a unit wavelength interval is expressed by Planck’s law:

Accordingly, I calculate the spectral density of blackbody radiation as follows (in the zero column of the cmf2 color matching function table are the wavelength values in nanometers):

Please note, I skipped over the constant factor, since it is still reduced with further normalization in brightness (the brightness of the light source does not affect the color temperature).

Then I calculate the linear coordinates of RGB:

RGB linear coordinates are converted to (u,v) coordinates as follows:

On the plane (u,v), the geometric distance between the points of the considered color and the color of a blackbody of a given temperature T is calculated:

For example, for the standard white light source, the dependence of this distance on temperature looks like this:

The value of T at which this dependence has a minimum is the color temperature of the considered light source.

## Sun's spectral density of radiation

The data of the spectral density of the solar radiation in the absence of the atmosphere I downloaded from here: [5]. The light source corresponding to the Sun from space, I will refer to as E490 in the future. Also for comparison in the calculations, I consider the standard illuminant D65. This source represents white light. I look at it to show what the Moon would look like if the Sun were white. The data of the spectral density of radiation of standard illuminant D65 I downloaded from here: [6].

As will be shown below, light sources D65 and E490 have color temperatures of 6467K and 5912K, respectively. The spectral radiation densities of the light sources D65, E490 and absolutely black bodies of the corresponding temperatures are as follows:

You can see that the spectral density of solar radiation is higher than that of a white light source at longer wavelengths, i.e., at wavelengths of red light (620-770 nm). This means that the Sun has a reddish tint. Indeed, the calculations give the following colors of the light sources D65, E490 and blackbodies of corresponding temperatures (as I said, white paper with an albedo of 0.91 is considered):

Note, the coordinates of the sRGB of the Sun and a blackbody temperature of 5912K exactly match. This is not explained by anything, it just happens.

The color of the circles in the last picture is the true color of the Sun from space. The human eye clearly sees the reddish tint of the Sun. So, the fact that the Sun from space is white is a big myth! It should be noted that for some reason this tint is not observed on the Apollo photos and videos. In real photographs, the visible reddish tint of the Sun would certainly appear on the white surfaces of the American flag and spacesuits. And as will be shown below, this tint of the Sun makes a significant contribution to the «redness» of the Moon from space.

## Is the Moon different or the same color?

Opponents of the theory of the lunar conspiracy promote the version that the Moon is different in color. Allegedly, the Moon is gray in places, brown in places, and the Apollos landed where the Moon is gray. But this version directly contradicts scientific data. The article [7] clearly states:
The color differences on the Moon are extremely small.

Shevchenko also writes in his book [8]:
For many years, the famous American researcher T. McCord worked in this direction. He obtained more than 200 spectra for different parts of the lunar surface of 10–20 km each. All the curves obtained are basically similar in appearance.

So, no, the Moon is not different in color, but the same.

## Color data according to Shevchenko

Shevchenko in his book [8] gives the following dependence of reflectivity on the wavelength.

In my calculations, I apply the piecewise linear interpolation of this data. The missing data on the interval of 820-830 nm, I received by direct continuation of the segment on the interval of 690-820 nm.

## Color data according to LRO

The dependence of the reflectivity of the lunar surface on the conditions of illumination and observation at wavelengths from 321 nm to 689 nm is given in [9]. The model parameters were calculated based on the analysis of data obtained by the Lunar Reconnaissance Orbiter (LRO). The lighting and observation conditions are determined by the three parameters i (angle of incidence), e (reflection angle) and g (phase angle). These angles are shown in the following diagram:

The phase angle can be expressed in terms of the azimuth angle using the spherical law of cosines as follows:

In the calculations, I take the traditional values of the angles i = g = 30°, e = 0°. For such angles, the following dependence of the reflectivity on the wavelength is obtained (graph lro30):

I did a linear extrapolation of the LRO data over the interval of 689-830 nm so that the ratio of the values at the points of 830 nm and 689 nm was the same as that of the Shevchenko data (shev plot). I also renormalized Shevchenko’s data by multiplying by 0.8315 so that the brightness of the resulting color according to Shevchenko and LRO were the same.

## Color data according to «Kaguya»

In [10], data obtained by the second Japanese artificial satellite of the Moon are presented. Unfortunately, the reflectivity in the visible wavelength range is given with very low resolution, so I do not use it in my calculations.

But the work is interesting in that it speaks of the colossal discrepancies between the data of Kaguya and the data of the Apollo 16 mission. And this is one of the rare cases when the scientific community openly speaks of inconsistencies associated with the flights of Americans to the Moon.

## Calculation results

Further I will use the following notation:
D65 – standard white light source D65;
E490 – the source of light from the Sun in the absence of the atmosphere;
W-0.91 – white paper with albedo 0.91;
LRO(30°) – LRO data for traditional angles i = g = 30°, e = 0°;
Shevch. – data by Shevchenko;
lin. (2°) – linear coordinates of RGB with 2-degree field of view;
lin. (10°) – linear coordinates of RGB with 10-degree field of view;
lin. (avg.) – linear coordinates RGB, averaged over the 2-degree and 10-degree field of view;
sRGB (100%) – coordinates of sRGB, obtained from linear coordinates RGB, averaged over the 2-degree and 10-degree field of view;
sRGB (200%) – coordinates of sRGB, obtained from the doubled linear coordinates of RGB, averaged over the 2-degree and 10-degree field of view;
sRGB (300%) – coordinates of sRGB, obtained from the tripled linear coordinates of RGB, averaged over the 2-degree and 10-degree field of view;
sRGB (400%) – coordinates of sRGB, obtained from the quadruple linear coordinates of RGB, averaged over the 2-degree and 10-degree field of view;
cl. temp. – color temperature obtained from the linear coordinates of RGB, averaged over the 2-degree and 10-degree field of view;

D65
W-0.91 LRO(30°) Shevch.
lin. (2°) 0.9076,0.9120,0.8968 0.1177,0.0931,0.0688 0.1202,0.0931,0.0697
lin. (10°) 0.9084,0.9122,0.8929 0.1165,0.0916,0.0687 0.1188,0.0917,0.0696
lin. (avg.) 0.9080,0.9121,0.8948 0.1171,0.0924,0.0688 0.1195,0.0924,0.0697
sRGB (100%) rgb(244,245,243) rgb(96,86,74) rgb(97,86,75)
sRGB (200%) - rgb(133,119,104) rgb(134,119,104)
sRGB (300%) - rgb(160,144,125) rgb(161,144,126)
sRGB (400%) - rgb(182,164,143) rgb(184,164,144)
cl. temp. 6467K 4928K 4891K

E490
W-0.91 LRO(30°) Shevch.
lin. (2°) 1.0005,0.8892,0.8490 0.1283,0.0909,0.0649 0.1310,0.0909,0.0657
lin. (10°) 1.0021,0.8888,0.8483 0.1272,0.0895,0.0650 0.1297,0.0895,0.0659
lin. (avg.) 1.0013,0.8890,0.8486 0.1277,0.0902,0.0649 0.1303,0.0902,0.0658
sRGB (100%) rgb(255,242,237) rgb(100,85,72) rgb(101,85,73)
sRGB (200%) - rgb(138,118,101) rgb(140,118,102)
sRGB (300%) - rgb(166,142,122) rgb(168,142,123)
sRGB (400%) - rgb(189,162,139) rgb(191,162,140)
cl. temp. 5912K 4550K 4512K

The following image shows the Moon's surface colors sRGB (100%), sRGB (200%) (doubled brightness), sRGB (300%) (tripled brightness), sRGB (400%) (quadruple brightness) with E490 light source (i.e. when observed from space) according to LRO and Shevchenko.

As you can see, the Moon from space has brown color, both according to LRO data, and according to Shevchenko's data. Shevchenko turns out to be a little (barely noticeably) redder than LRO.

## Color of the Moon in the photos

In this section we will do the coloring of photos. Let the image img and the color in linear coordinates RGB are given. Each pixel of the image is replaced by a pixel of a given color of the same brightness as that of the source pixel. The image in the Mathcad program is represented as a single sRGB coordinate matrix, which is obtained by stitching three “R”, “G”, “B” matrices from left to right. With this in mind, the coloring procedure is as follows:

For interest, I took photographs of the Apollo photo album depicting the lunar surface of the American program and repainted it in the colors obtained from my calculations. I give only the results, and the conclusion that these authentic photos or fake, make it yourself.

The result of the picture AS11-44-6552 coloring:

In the middle are the original photos. On the left, the photographs are painted in colors according to LRO data at traditional angles i = g = 30°, e = 0°, and on the right, according to Shevchenko's data. The top row corresponds to the standard illuminant D65, i.e. the top row shows the colors of the surface of the Moon, which would have been obtained if the Sun were white. The bottom row corresponds to the light source E490, i.e., the bottom row shows the natural colors of the Moon's surface as seen from space.

As you can see, the reddish tint of the Sun makes a significant contribution to the «redness» of the surface of the Moon, which ultimately looks brown, and not gray at all.

The gray color of the Moon in the photos of NASA could be explained by the fact that for some reason the film “went away” to blue, but this version disappears immediately if we analyze the pictures of gray gradations at the end of the albums. The photograph as11-44-chart shows such a snapshot for the last photo above. I put real grays of the same brightness as in the photo to the left of the gray gradations, and also wrote out the sRGB coordinate values. The result was the following image:

As you can see, the film not only did not “go away” in blue, but even slightly “went away” in the opposite direction from the blue. Such a deviation cannot turn brown to gray.

The result of the coloring photo AS11-40-5903:

In the original photo, the lunar surface in places has not just a gray color, but even a slight bluish tint. The photograph as11-40-chart shows the corresponding picture of the gradations of gray:

The film «went away» not to the «blue» color, but to the «red». And even after that, for some reason, the lunar surface in the NASA photo is gray.

The result of the coloring photo AS11-37-5455:

This is one of the rare photos of the program «Apollo», where the lunar surface has a brown tint, though not entirely. Opponents of the theory of the lunar conspiracy like to show it, they say, look, brown. But the trick has crept in here. Let us analyze the photo as11-37-chart, which shows the corresponding picture of gray gradations:

The film just «left» in brown. That's the whole reason for the brown tint of the lunar surface in NASA photographs.

## The dependence of the color of the lunar surface on the conditions of illumination and observation

Using the LRO data given in [9], we investigate how the color of the surface of the Moon varies from lighting and observation conditions. Consider the light source E490 (the Sun from space) and different values of the angles i, e, . The following picture shows the result, where in the top row are colors with a triple brightness, and in the bottom row are colors reduced to the same brightness Y = 0.5.

As can be seen from the picture, only the brightness changes. In the bottom row, the colors are almost the same everywhere for the human eye. Although, if you look closely, in the case of i = 0°, you can see a very slight deviation in the gray direction as e approaches zero.

## Moon soil color

The NASA website has a very strange photograph, namely this photograph of lunar soil sample No. 10005.

The lunar soil on the photo looks brown, even too brown given the fact that the lighting was produced by a white light source. The correctness of the white balance can be checked by the color of the white paper that came into the frame.

Maybe this is the same orange ground that the Apollo 17 astronauts found? Not! The document [11] clearly states that the sample was taken by the Apollo 11 astronauts.

And now let's listen to what Neil Armstrong (Apollo 11 astronaut) says in an interview with Patrick Moore [12] he gave in 1970.

When you look at the material at close range, as if in your hand, you find it's a charcoal gray in fact, and we were never able to find any things that were very different from that color.

It turns out, Neil Armstrong, not afraid of the word, lied.

## Literature

1. Colour & Vision Research Laboratory – New CIE XYZ functions transformed from the CIE (2006) LMS functions
2. International Color Consortium – A Standard Default Color Space for the Internet: sRGB
3. Recommendation ITU-RBT.709 – Parameter values for the HDTV standards for production and international programme exchange
4. Robertson R. «Computation of correlated color temperature and distribution temperature» /.Opt. Soc. Am.58, 1528 (1968).
5. 2000 ASTM Standard Extraterrestrial Spectrum Reference E-490-00
6. CIE Standard Illuminant D65
7. «The first results of the determination of the physicomechanical properties of the soils of the Moon», M .: 1970. Gosstroy of the USSR, ed. prof. Dr. Techn. Sciences V. G. Bulycheva, p. 8. («Первые итоги определения физико-механических свойств грунтов Луны», М.: 1970. Госстрой СССР, под ред. проф. д-ра техн. наук В. Г. Булычева, стр. 8.)
8. Shevchenko V.V., The Moon and Its Observation, 1983, pp. 91-92. (Шевченко В.В., Луна и ее наблюдение, 1983, стр. 91-92.)
9. Hapke, B., B. Denevi, H. Sato, S. Braden, and M. Robinson (2012), The wavelength dependence of the lunar phase curve as seen by the Lunar Reconnaissance Orbiter Wide-Angle Camera, J. Geophys. Res., 117, E00H15
10. Ohtake,M. et al. (2010), Deriving the Absolute Reflectance of Lunar Surface Using SELENE (Kaguya) Multiband Imager Data, Space Sci. Rev., 154, 57-77
11. THE APOLLO 11 DRIVE TUBES, Dissection and description by Judith H. Allton, NASA (1978)
12. BBC. Neil Armstrong talks to Patrick Moore (1970)
+2
2.3K