# Feasibility of Magneto-Encephulography Scan under Color-Tailored Illumination
## Appendix A Method and Notations of Color Conversion
\begin{bmatrix}R\\ G\\ B\end{bmatrix} \equiv\frac{1}{0.1769}\times \begin{bmatrix}0.49&0.31&0.20\\ 0.1769&0.8124&0.0106\\ 0.00&0.01&0.99\end{bmatrix} \times \begin{bmatrix}R\\ G\\ B\end{bmatrix} . \tag{11}\]  
Inverse of the Equation (11) is used to calculate R, G, B color space from X, Y, Z:  
\[ \begin{bmatrix}R\\ G\\ B\end{bmatrix} = \begin{bmatrix}0.4184&-0.1586&-0.0828\\ -0.0911&0.2524&0.0157\\ 0.00092&-0.0025&0.1786\end{bmatrix} \times \begin{bmatrix}X\\ Y\\ Z\end{bmatrix} . \tag{12}\]  
The presented nomenclature allows us to transform color spaces between RBG, XYZ, and chromaticity \(xy\) (with \(Y\) brightness). Those conversions were coded using readily available Python libraries [13]. Adding amber color with fixed intensity to the RGB LED spectrum was handled by the same Equations (11) and (12), with the mixing rule defined below (Equation (13)). For example, 1500 K (candle light) RGBA values are obtained by, first, calculating \(x,y\) coordinates correlated to 1500 K from CIE 1931 chromaticity diagram: \(x=0.58572505\), \(y=0.39311745\). Then, \(X,Y\), and \(Z\) are derived by applying the \(x,y\) data from Equation (11) with setting \(Y=1\) for the calculation. Those calculated \(X,Y,Z\) defined RGB colors by applying Equation (12). The correlated RGB values for 1500 K (candle light) are \((R,G,B)=(0.4603,0.1175,0.0084)\). The RGBA values for 1500 K are obtained from the following consideration. The AGB triangle \(R(AGB)=0\), \(A(AGB)=1\) and similarly for the RGB triangle \(R(RGB)=1\), \(A(RGB)=0\). The amber, red, and green colors are in a straight line. Therefore, the amber ratio can be considered as \(A=(1-R)\sigma\), assuming that green color is constant (see, next paragraph and Equation (14) where \(\sigma=0.64\) for 1500 K light is a weight parameter used in LUME-20R lamp). One arrives at \(A=(1-0.4603)0.64=0.3454\). This method was applied to obtain RGBA values for any correlated color temperature (CCT) values. Color rendering was made by controlling intensity of separate RGB+amber contributions via current defining the intensity (power) of the corresponding color LED. Unlike RGB LED lamps available in the market, blending RGB+amber colors provides extra control of color fidelity, color saturation, and dulling effects (Figure 1). Color rendering was based on varying spectral power between the G and R regions of CIE 1931 _xy_ chromaticity diagram at the wavelength from 530 nm to 620 nm. The white light falls on AGB and RGB triangle [6]. Hence, the white light can be generated with the mixture of spectral powers \(S_{AGB}\) or \(S_{RGB}\) or a linear mixture of both by controlling R and A color ratio [6]:  
\[S_{RGBA}=\sigma S_{AGB}+(1-\sigma)S_{RGB}, \tag{10}\]  
where \(\sigma\) is the weight parameter \(0<\sigma<1\). The radiant flux is calculated by the following equations:  
\[R_{RGBA} =(1-\sigma)R_{RGB}, \tag{11}\] \[A_{RGBA} =\sigma A_{AGB},\] (12) \[G_{RGBA} =\sigma G_{AGB}+(1-\sigma)G_{RGB},\] (13) \[B_{RGBA} =\sigma B_{AGB}+(1-\sigma)B_{RGB}. \tag{14}\]  
The rule above was used to set individual color intensity by the electrical current of the corresponding LED.