###### Abstract  
Color distortion in an image presents a challenge for machine learning classification and regression when the input data consists of pictures. As a result, a new algorithm for color standardization of photos is proposed, forming the foundation for a deep neural network regression model. This approach utilizes a self-designed color template that was developed based on an initial series of studies and digital imaging. Using the equalized histogram of the R, G, B channels of the digital template and its photo, a color mapping strategy was computed. By applying this approach, the histograms were adjusted and the colors of photos taken with a smartphone were standardized. The proposed algorithm was developed for a series of images where the entire surface roughly maintained a uniform color and the differences in color between the photographs of individual objects were minor. This optimized approach was validated in the colorimetric determination procedure of vitamin C. The dataset for the deep neural network in the regression variant was formed from photos of samples under two separate lighting conditions. For the vitamin C concentration range from 0 to 87.72 ug\(\cdot\)mL\({}^{-1}\), the RMSE for the test set ranged between 0.75 and 1.95 ug\(\cdot\)mL\({}^{-1}\), in comparison to the non-standardized  
on paper. HSI/HSV (hue, saturation, intensity/value) is often used in image analysis and computer vision due to its alignment with human perception of colors. YUV and YCbCr are used in video compression and broadcasting, separating the image into luminance and chrominance components to optimize data storage and transmission. The CIE Lab color space, developed by the International Commission on Illumination, provides a perceptually uniform color representation, making it ideal for color differentiation and transformation tasks. RAL CLASSIC is a widely used color matching system in Europe, consisting of 213 standardized colors, while RAL DESIGN offers a more extensive palette of 1625 colors for designers and architects. RAL DIGITAL facilitates precise color communication in digital applications through RGB and CMYK values. The PANTONE Matching System (PMS) is globally recognized in graphic design, printing, and fashion, providing standardized color codes to ensure consistency across different media and materials. Each of these color spaces has its own advantages and applications, catering to the specific needs of various industries. If color is the main, decisive criterion in image analysis that codes the information we are looking for, it is crucial to take photos in such a way as to maintain the appropriate quality of this parameter. The true color of the image allows for the correct interpretation of various features of the photographed objects. Undesirable variability may arise from the use of multiple devices to capture images or from the method of acquiring images with a single device under uncontrolled or changing conditions. Significant factors include changes in lighting conditions, reflections on shiny surfaces, and variations such as the time of day. These elements may not directly impact the photo's quality but can influence its informational value. Therefore, the importance of color standardization as a crucial step in data preprocessing should be considered. Various computational approaches for preserving or restoring the true color of images within a dataset for deep learning are described in numerous works, offering solutions to this problem. This study presents an original algorithm for standardizing the colors of photos captured with a single smartphone camera under various lighting conditions. It also considers variability resulting from incidental factors associated with the photography process and the inherent lack of perfect repeatability of the camera. The research was focused on a homogeneous liquid that showed minimal color variation among the tested objects.