# The color of the moon and the sun from space in the values ​​of RGB and color temperature It would seem that the question of the color of the Moon and the Sun from space is so simple for modern science that in our century there should not be any problems with an answer. We are talking about colors when observed precisely from space, because the atmosphere leads to a color change due to Rayleigh scattering of light. “Surely somewhere in the encyclopedia about this in detail, in numbers it has long been written,” you say. Well, right now, try searching the Internet about this information. Happened? Probably not. The maximum that you will find is a couple of words that the moon has a brownish tint, and the sun is reddish. But you will not find information on whether these shades are visible to the human eye or not, especially the values ​​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 depicted absolutely gray,

My purely personal opinion is nothing but a consequence of the interference 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 in RGB, there is complete information about the spectral density of the solar radiation and the reflectivity of the moon in the spectrum. This is enough to get the exact colors in the RGB values. You just need to carefully calculate what, in fact, I did. In this article I will share the results of the 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 performed the calculations in the Mathcad program and, accordingly, the code fragments will be in the built-in programming language, which is quite suitable as a pseudo-code that is understandable to all.

At the same time, I’ll tell you in detail what is the RGB color model, with which, I think, you are all familiar. This question is actually not entirely simple either. For example, try to answer the following two questions. Let the color rgb (120,80,100) be given .
1) What are the values ​​of RGB color, which is 2 times darker than the specified?
2) What are the RGB values ​​for gray that have the same brightness as the given?
It would seem that what is there to think, divide by 2 in the first case, i.e. rgb (60,40,50) and average 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 that.

I will also talk about color temperature and how to calculate it.

## XYZ color space

XYZ is a reference color model defined in the strict mathematical sense by CIE (International Commission on Illumination) in 1931. Model CIE XYZ is a master model of almost all other color models used in technical fields. XYZ color is set as follows: Where - the spectral density of any energy photometric quantity (for example, radiation flux, energy brightness, etc., in absolute or relative terms) in the wavelength range from 390 to 830 nm (this according to 2006, in 1931 the range was from 380 to 780 nm ); , , - color matching functions. Moreover, which is important for us, the Y coordinate corresponds to the visual brightness of the signal.

The color matching function data I downloaded from here: [ 1 ]. There, the color matching functions are defined for the 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 expected, the color coordinates differ slightly. Naturally, I used these functions with the maximum resolution provided, that is, with a step of 0.1 nm . The graphs of the color matching functions are as follows: The graphs show that above 710 nmthe functions become negligible in the sense that when observing a color close to white, the spectral density in the range above 710 nm makes almost no contribution. Although we know that visible light lies in the range up to 780 nm , we must understand that this is with monochromatic radiation. I’m all of this to the fact that in some calculations I had to extrapolate the missing data of the moon’s reflectivity just to the range where the color matching functions are essentially small. Therefore, a possible extrapolation error does not lead to a noticeable error in the calculated colors.

I calculate the indicated integrals by the trapezoid method : where c is the coordinate number of the color space (1, 2, 3 for X, Y, Z, respectively); cw - 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 coordinates. Check if this property holds: where one is an array of 1; cmf2_ and cmf10_ are color matching function tables for the 2-degree and 10-degree field of view, respectively. As you can see, the property is satisfied with an accuracy of 0.01% , which is very good. But still, we renormalize functions for fidelity: ## Brightness normalization

Consider the operation of a digital camera. The main element of a digital camera is a matrix, which consists of photosensors. When projecting an image onto a matrix, an electric charge is proportional to each of its photosensors, which is proportional to the radiation energy of the photosensor. Photosensors capture the brightness of an image element without any information about its color. To obtain information about color, the matrix of photosensors is covered with a matrix of miniature light filters on top. These filters serve as color matching functions. Each pixel consists of several photosensors, which in total are superimposed all kinds of filters.

So, as a function we should take the spectral density of the irradiation energy of one pixel. Such a spectral density can be represented as where illumination is the spectral radiation density of the light source; albedo - reflectivity of the surface of the photographed object; coef - a certain constant coefficient, which is determined by the exposure time, aperture, distance from the light source to the photographed object and other factors. Reflectance refers to the apparent 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 a completely white surface perpendicular to the rays.

Now imagine that we are doing the work of a photo exposure meter, with which the photographer sets the shutter speed and aperture on the camera. In other words, we need to choose the coef value so that the picture turns out to be normal in brightness, not too dark, not too bright. Imagine that behind the photographed object is a completely white screen. The reflectance albedo of such a screen is by definition equal to 1 at all wavelengths. Set the coef value so that the visual brightness Y of this screen in the image is 1. Why 1? Because in the RGB color model, the maximum possible brightness value is 1, which is achieved with rgb (255,255,255), i.e. with white color. I will talk about this later. Since ordinary bodies are darker in color than a completely white screen, images will be normal in brightness. From these considerations, we obtain 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 shoot an absolutely white screen with a red light source, then the RGB color will skyrocket.

So, I calculate the coordinates 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 did not provide such an extreme case. Obviously, we need to photograph the white surface illuminated by the Sun. Since the Sun from outer space has a reddish hue, then, as I said, the color of an absolutely white screen goes off scale. Therefore, we must take the surface darker. I experimentally found that you need to take white paper with an albedo of 0.91. You can’t take more albedo, it begins to roll over. Thus, in order to get the color of the Sun, I just 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 talking about RGB without clarification, they mean the sRGB color space, which 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 look at this standard, a description of which is available at [ 2 ] .

The conversion of XYZ to sRGB takes place in three stages. First, the XYZ coordinates are converted to linear RGB coordinates, then the linear coordinates are converted to non-linear RGB coordinates, and finally the 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: the opposite is true: I wonder where did these strange numbers come from in square matrices? And they came from the recommendation 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 that must be met for the second matrix. From these requirements, the second matrix can be uniquely calculated, and the first is the inverse of the second matrix.

We introduce the following functions: Then the requirements of recommendation ITU-R BT.709 take the following form: We have 8 equations, when we have 9 unknown elements of the RGB_to_XYZ matrix , that is, one more equation is missing. And the missing equation was implicitly set, I had to guess it myself. The essence of this equation is that for white, the visual brightness Y should be equal to 1: I found the exact solution to these equations in rational numbers: If I round the numbers in my result to four decimal places, we get exactly the same strange numbers in the standard of the International Color Consortium. In my calculations, I use not rounded matrices, but the above exact ones (as far as double-precision floating-point numbers allow ).

So, the linear coordinates of RGB based on the table of color matching functions (cmf), spectral radiation density (illumination) and reflectance (albedo) I calculate as follows: I also use linear RGB coordinates averaged over 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 from the zero element): We continue to parse the standard. Each linear RGB coordinate is converted to non-linear using the non-linear lin2bit function, and vice versa, 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, non-linear RGB coordinates are converted to 8- bit multiplication by 255 followed by rounding to integers.

Thus, I have defined the following functions for converting linear RGB coordinates to 8-bit and vice versa: Now we are ready to solve the problem from the introduction. I remind you of the condition.

Let rgb color be given (120,80,100).
1) What are the values ​​of RGB color, which is 2 times darker than the specified?
2) What are the RGB values ​​for gray that have the same brightness as the given?

Solution: Answers: 1) rgb (86.56.71) ; 2) rgb (92.92.92) .

## Colour temperature

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

For a completely black body 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 radiation density of an absolutely black body as follows (the wavelengths in nanometers are in the zero column of the color matching function cmf2 table): Please note that I omitted the constant factor, because it still decreases with further normalization by brightness (the brightness of the light source does not affect the color temperature).

Next, I calculate the linear coordinates of RGB: The linear coordinates of RGB are converted into coordinates (u, v) as follows: On the plane (u, v) , the geometric distance between the points of the color in question and the color of the black body of the given temperature T is calculated: For example, for a 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 light source in question.

## The spectral density of the radiation of the sun

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

As will be shown below, the D65 and E490 light sources have color temperatures of 6467K and 5912K, respectively. The spectral radiation densities of light sources D65, E490 and absolutely black bodies of the corresponding temperatures are as follows: It can be noted that the spectral radiation density of the Sun 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 absolutely black bodies of the corresponding temperatures (as I said, white paper with an albedo of 0.91 is considered): Note that the sRGB coordinates of the Sun and the absolutely black body of temperature 5912K exactly match. This is not explained by anything, it just happens.

The color of the circles in the last picture is the real 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 shade is not observed in the photographs and video of the Apollo program. In these photographs, the visible reddish hue of the Sun would certainly appear on the white surfaces of the American flag and spacesuits. And as will be shown below, this shade of the Sun makes a noticeable contribution to the "redness" of the Moon from space.

## Is the moon different or the same in color?

Opponents of the theory of the lunar conspiracy are promoting the version that the moon is different in color. Allegedly in places the moon is gray, in places it is brown, and at the same time the Apollo landed where the moon is gray. But this version directly contradicts scientific data. The article [ 7 ] explicitly says:
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 various sections of the lunar surface measuring 10–20 km each. All obtained curves are basically similar in appearance.

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

## Color data of the moon according to Shevchenko

Shevchenko in his book [ 8 ] gives the following dependence of reflectivity on wavelength. In my calculations, I use piecewise linear interpolation of this data. I received the missing data in the range of 820–830 nm by direct continuation of the segment in the range of 690–820 nm.

## Moon Color Data by LRO

The dependence of the lunar surface reflectivity 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 (abbreviated LRO). Lighting and observation conditions are determined by three parameters i (angle of incidence), e (angle of reflection) and g (phase angle). These angles are shown in the following diagram: The phase angle can be expressed in terms of the azimuthal angle using the spherical cosine theorem 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 reflectance on the wavelength is obtained (graph lro30): I made a linear extrapolation of the LRO data to the interval 689-830 nm so that the ratio of the values ​​at the points 830 nm and 689 nm was the same as the Shevchenko data ( schedule shev). I also renormalized Shevchenko’s data by multiplying by 0.8315 so that the brightness of the resulting color calculations according to Shevchenko and LRO were the same.

## Color Information for the Moon by Kaguya

The work [ 10 ] presents data obtained by the second Japanese artificial moon satellite. Unfortunately, the reflectivity in the visible wavelength range is given with a very low resolution, so I do not use it in my calculations.

But the work is interesting in that it talks about the colossal discrepancies of the Kaguya data with 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 - a standard source of white light D65;
E490 - light source from the Sun in the absence of atmosphere;
B-0.91 - white paper with an albedo of 0.91;
LRO (30 °) - LRO data for traditional angles i = g = 30 ° , e = 0 ° ;
Shevch. - data on Shevchenko;
ling. (2 °) - linear RGB coordinates at a 2-degree field of view;
ling. (10 °) - linear RGB coordinates at a 10-degree field of view;
ling. (average) - linear RGB coordinates averaged over2-degree and 10-degree field of view;
sRGB (100%) - sRGB coordinates obtained from linear RGB coordinates averaged over a 2-degree and 10-degree field of view;
sRGB (200%) - sRGB coordinates obtained from doubled linear RGB coordinates averaged over a 2-degree and 10-degree field of view;
sRGB (300%) - sRGB coordinates obtained from tripled linear RGB coordinates averaged over a 2-degree and 10-degree field of view;
sRGB (400%) - sRGB coordinates obtained from quadruple linear RGB coordinates averaged over2-degree and 10-degree field of view;
col. pace. - color temperature obtained from linear RGB coordinates averaged over a 2-degree and 10-degree field of view;

D65
B-0.91LRO (30 °)Shevch.
ling. (2 °)0.9076,0.9120,0.89680.1177,0.0931,0.06880.1202,0.0931,0.0697
ling. (10 °)0.9084,0.9122,0.89290.1165.0.0916.0.06870.1188,0.0917,0.0696
ling. (average)0.9080,0.9121,0.89480.1171,0.0924,0.06880.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)
col. pace.6467K4928K4891K

E490
B-0.91LRO (30 °)Shevch.
ling. (2 °)1.0005,0.8892,0.84900.1283.0.0909.0.06490.1310,0.0909,0.0657
ling. (10 °)1.0021,0.8888,0.84830.1272.0.0895.0.06500.1297.0.0895.0.0659
ling. (average)1.0013,0.8890,0.84860.1277,0.0902,0.06490.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)
col. pace.5912K4550K4512K

The following image shows the lunar surface colors sRGB (100%) , sRGB (200%) (double brightness), sRGB (300%) (triple brightness), sRGB (400%) (quadruple brightness) with an E490 light source (i.e. upon observation from space) according to the data of LRO and Shevchenko. As you can see, the Moon from outer space has a brown color both according to the LRO data and according to Shevchenko. By Shevchenko it turns out a little (barely noticeable) redder than by LRO.

## Color of the moon in photos

In this section we will deal with the coloring of photographs. Let the image img and color in linear coordinates of RGB be given . Each image pixel is replaced by a pixel of a given color of the same brightness as that of the color of the original pixel. The image in Mathcad is presented as a single sRGB coordinate matrix, which is obtained by stitching the three matrices “R”, “G”, “B” from left to right. With this in mind, the coloring procedure is as follows: For fun, I took photographs of the lunar surface from the Apollon US photo albums and repainted them in the colors obtained from my calculations. I give only the results, and make a conclusion about whether these photos are genuine or false, yourself.

Result of coloring of a photograph AS11-44-6552: In the middle are the original photos. On the left, the photographs are colored according to the LRO data for traditional angles i = g = 30 ° , e = 0 ° , and on the right, according to Shevchenko’s data. The upper row corresponds to the standard light source D65, i.e., the upper row shows the surface colors of the moon, which would have been obtained if the sun were white. The lower row corresponds to the E490 light source, i.e., the lower row shows the natural colors of the moon's surface when observed from space.

As you can see, the reddish hue of the Sun makes a noticeable contribution to the “redness" of the surface of the Moon, which in the end looks brown, not gray at all.

The gray color of the moon in NASA photographs could be explained by the fact that the film for some reason “went” blue, but this version immediately disappears if we analyze the images of gray gradations at the end of the albums. The photo as11-44-chart shows such a picture for the last photo above. I left real grays of the same brightness on the left of the gradations of gray in the same brightness as in the photograph, and also wrote down the sRGB coordinates. As a result, the following image was obtained: As you can see, the film not only didn’t “go” to blue, but even “left” a little in the opposite direction from blue. Such a deviation cannot turn brown into gray.

The result of coloring the photo AS11-40-5903 : In the original photograph, the lunar surface in places has not just a gray color, but even a slight bluish tint. The as11-40-chart photo shows the corresponding image of gray gradations: The film "went" not to "blue" color, but to "red". And even after that, for some reason, the lunar surface in NASA's photograph is gray.

Result of coloring a photograph AS11-37-5455 : This is one of the rare photographs of the Apollo program, where the lunar surface has a brown tint, albeit not entirely. Opponents of the theory of the lunar conspiracy love to show it, they say, look, brown is the same. But here the catch crept in. Let's analyze the photo as11-37-chart , which shows the corresponding image of gray gradations: The film simply “went” 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 lighting conditions and observation

Using the LRO data given in [ 9 ] , we study how the color of the lunar surface changes due to lighting and observation conditions. Consider the light source E490 (the Sun from space) and the different values ​​of the angles i , e , . The following picture shows the result, where the colors in the upper row are threefold brighter and the colors in the bottom row are reduced to the same brightness Y = 0.5 . As you can see 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 i = 0 °, you can see a very weak deviation to the gray side as e approaches zero.

## The color of the lunar soil

There is a very strange photograph on NASA's website, namely this photograph of the lunar soil sample No. 10005 . The lunar soil in the photograph looks brown, even too brown, given that the lighting was produced by a white light source. The correct white balance can be checked by the color of the white paper that fell into the frame.

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

Now let’s listen to what Neil Armstrong (Apollo 11 astronaut) says in an interview with Patrick Moore [ 12 ] , which he gave in 1970.

When you look at the ground near or in your hand, you find that it is actually coal gray, and we especially could not find anything different from this color.

(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, I’m not afraid of the word, lied.

## Literature

1. Color & 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 program 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 Determining the Physico-Mechanical Properties of the Soils of the Moon”, Moscow: 1970. Gosstroy, USSR, under the editorship of prof. Dr. tech. Sciences of V. G. Bulychev, p. 8.
8.Shevchenko V.V., Moon and its observation, 1983, pp. 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 Interview with Patrick Moore (1970)