## 2 Materials and Methods  
The dyes used in permanent makeup were implemented on the skin of the pig's ear, which is structurally the most similar to human skin. 5 different colors were implemented into the examined skin fragment using a micropigmentation device (Conture-Linner-Duo; Long-Time-Liner, Germany). For lip pigmentation: red shade (B1), light pink shade (B2), nude (B3), and dirty pink shade (B4) were used. The control dye was white (B5) (Figure 1). The characteristics based on RGB, CMYK, and L*a*b* color scales of the dyes used before the laser procedure is shown in Table 1.  
The spectral parameters of the pigments presented on pig skin were studied by hyperspectral imaging using a SPECIM IQ hyperspectral camera (Specim Ltd., Oulu, Finland), characterized by the following technical parameters--spectral resolution: 7 nm; spatial resolution: 512 \(\times\) 512 pixels; spectral range: 400-1000 nm; dynamic range: 12 bits; number of spectral channels: 86; camera field of view: 31 \(\times\) 31 degrees. The spectral range of the camera, for which the optical parameters of dyes were identified, coincides with the wavelength range of lasers used in permanent makeup laser removal [23]. Two measurements on the skin were performed using a hyperspectral camera. The first one was performed after pigmentation of the skin with dyes, and the second after using a Q-switched Nd:YAG laser with a wavelength range of 532 nm and 1064 nm. The laser energy was 20 J/cm\({}^{2}\). Lighting with a flat spectral characteristic in the camera operating range, i.e., 400-1000 nm, was used to illuminate the tested samples. An exemplary hyperspectral imaging diagram is shown in Figure 2. \begin{table}
\begin{tabular}{c c c c} \hline  & **RGB** & **L*a*b** & **CMYK** \\ \hline B1 & 154; 22; 19 & 34; 52; 40 & 25; 100; 100; 23 \\ B2 & 227; 108; 110 & 61; 47; 22 & 7; 71; 49; 0 \\ B3 & 195; 87; 78 & 51; 44; 27 & 18; 78; 70; 25 \\ B4 & 43; 57; 54 & 43; 51; 52 & 21; 91; 84; 10 \\ B5 & 255; 255; 255 & 100; 0; 0 & 0; 0; 0; 0 \\ \hline \end{tabular}
\end{table} 
Table 1: Characteristics of the used dyes (before the laser procedure). Figure 1: Dye shades used in the study. The analysis of the obtained spectral images was carried out using the Matlab software version 7.11.0.854 (R2010b), which enabled the analysis of GLCM and reflectance as well as the analysis of the homogeneity of the dyes' distribution. Then, based on the comparison of the results obtained before and after the procedure, the effectiveness of the method was assessed. The GLCM (Gray level co-occurrence matrix) analysis, a method of quantitative analysis of the skin texture, was also used to analyze the dyes images. The method determines the spatial relation between examined pixel and its adjacent pixels. It provides information about the frequency of occurrence of certain pixels characterized by the same brightness at a certain distance from each other. The parameters describing the GLCM matrix include the distance and angle between the evaluated pairs of pixels. The GLCM analysis was carried out after normalizing the image using Adobe Photoshop Lightroom Classic 2018 8.1 software. The purpose of the normalization was to extend the gray levels from 0 to 255, where 0 means white and 255 means black [24; 25; 26]. The hyperspectral camera with gray panel is shown in Figure 3, and it allows the measurement of absolute reflectance. Contrast and homogeneity were used for the analysis in order to obtain two-dimensional images using 14 textural features isolated by Haralicka. Contrast is calculated based on the difference between the highest and lowest values in the color and brightness of the test points. Homogeneous images have contrast values close to or equal to 0. Homogeneity, on the other hand, represents the similarity between specific areas of the images, with values in the range of 0-1. Homogeneity values close to 1 indicate smaller differences between the analyzed set of pixels.