Color Simulation of Multilayered Thin Films Using Python
Abstract
:1. Introduction
2. Materials and Methods
2.1. Theoretical Background
2.1.1. Reflection from a Bulk Surface
2.1.2. Reflection from a (Multilayered) Thin Film
2.1.3. Color Simulation
2.2. Python Coding
Listing 1. Python code for data preprocessing. |
Listing 2. Python code used to calculate the reflection coefficients and the reflectance. |
Listing 3. Python code used to convert the reflectance spectrum to RGB values. |
3. Results and Discussion
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
SnO2 | Tin dioxide |
ZnO | Zinc oxide |
SiO2 | Silicon dioxide |
Si | Silicon |
RGB | Red, Green, and Blue |
AI | Artificial intelligence |
sRGB | Standard Red, Green, and Blue |
CIE | Commission International de l’Eclairage |
CMFs | Color-matching functions |
References
- Li, K.; Li, T.; Zhang, T.; Li, H.; Li, A.; Li, Z.; Lai, X.; Hou, X.; Wang, Y.; Shi, L.; et al. Facile full-color printing with a single transparent ink. Sci. Adv. 2021, 7, eabh1992. [Google Scholar] [CrossRef] [PubMed]
- Li, R.; Li, K.; Deng, X.; Jiang, C.; Li, A.; Xue, L.; Yuan, R.; Liu, Q.; Zhang, Z.; Li, H.; et al. Dynamic High-Capacity Structural-Color Encryption via Inkjet Printing and Image Recognition. Adv. Funct. Mater. 2024, 34, 2404706. [Google Scholar] [CrossRef]
- Yang, Y.; Kim, J.B.; Nam, S.K.; Zhang, M.; Xu, J.; Zhu, J.; Kim, S.-H. Nanostructure-free crescent-shaped microparticles as full-color reflective pigments. Nat. Commun. 2023, 14, 793. [Google Scholar] [CrossRef] [PubMed]
- Kim, S.J.; Kim, S.; Lee, J.; Jo, Y.; Seo, Y.-S.; Lee, M.; Lee, Y.; Cho, C.R.; Kim, J.-p.; Cheon, M.; et al. Color of Copper/Copper Oxide. Adv. Mater. 2021, 33, 2007345. [Google Scholar] [CrossRef]
- Huang, Y.-S.; Lee, C.-Y.; Rath, M.; Ferrari, V.; Yu, H.; Woehl, T.J.; Ni, J.H.; Takeuchi, I.; Ríos, C. Tunable structural transmissive color in fano-resonant optical coatings employing phase-change materials. Mater. Today Adv. 2023, 18, 100364. [Google Scholar] [CrossRef]
- Lu, Y.; Shi, X.; Huang, Z.; Li, T.; Zhang, M.; Czajkowski, J.; Fabritius, T.; Huttula, M.; Cao, W. Nanosecond laser coloration on stainless steel surface. Sci. Rep. 2017, 7, 7092. [Google Scholar] [CrossRef]
- Badloe, T.; Kim, J.; Kim, I.; Kim, W.-S.; Kim, W.S.; Kim, Y.-K.; Rho, J. Liquid crystal-powered Mie resonators for electrically tunable photorealistic color gradients and dark blacks. Light Sci. Appl. 2022, 11, 118. [Google Scholar] [CrossRef]
- Lee, D.-J. Thin Film Interference. Available online: https://javalab.org/en/thin_film_interference_en/ (accessed on 24 March 2025).
- Oskooi, A.F.; Roundy, D.; Ibanescu, M.; Bermel, P.; Joannopoulos, J.D.; Johnson, S.G. Meep: A flexible free-software package for electromagnetic simulations by the FDTD method. Comput. Phys. Commun. 2010, 181, 687–702. [Google Scholar] [CrossRef]
- JA Woollam. Guide to Using WVASE32®; JA Woollam: Lincoln, NE, USA, 2002; p. 529. [Google Scholar]
- Kruschke, J. Doing Bayesian Data Analysis: A Tutorial with R, JAGS, and Stan; Elsevier: Amsterdam, The Netherlands, 2014. [Google Scholar]
- Lohumi, S.; Lee, H.; Kim, M.S.; Qin, J.; Cho, B.-K. Raman Imaging for the Detection of Adulterants in Paprika Powder: A Comparison of Data Analysis Methods. Appl. Sci. 2018, 8, 485. [Google Scholar] [CrossRef]
- Kurth, M.; Graat, P.C.J.; Mittemeijer, E.J. Determination of the intrinsic bulk and surface plasmon intensity of XPS spectra of magnesium. Appl. Surf. Sci. 2003, 220, 60–78. [Google Scholar] [CrossRef]
- Montoya-Escobar, N.; Ospina-Acero, D.; Velásquez-Cock, J.A.; Gómez-Hoyos, C.; Serpa Guerra, A.; Gañan Rojo, P.F.; Vélez Acosta, L.M.; Escobar, J.P.; Correa-Hincapié, N.; Triana-Chávez, O.; et al. Use of Fourier Series in X-ray Diffraction (XRD) Analysis and Fourier-Transform Infrared Spectroscopy (FTIR) for Estimation of Crystallinity in Cellulose from Different Sources. Polymers 2022, 14, 5199. [Google Scholar] [CrossRef] [PubMed]
- Agostinelli, S.; Allison, J.; Amako, K.; Apostolakis, J.; Araujo, H.; Arce, P.; Asai, M.; Axen, D.; Banerjee, S.; Barrand, G.; et al. Geant4—A simulation toolkit. Nucl. Instrum. Methods Phys. Res. Sect. A Accel. Spectrom. Detect. Assoc. Equip. 2003, 506, 250–303. [Google Scholar] [CrossRef]
- Blocken, B.; Stathopoulos, T.; Carmeliet, J. CFD simulation of the atmospheric boundary layer: Wall function problems. Atmos. Environ. 2007, 41, 238–252. [Google Scholar] [CrossRef]
- Kok, C.L.; Ho, C.K.; Taufik, A.S.; Koh, Y.Y.; Teo, T.H. Development of a Sustainable Universal Python Code for Accurate 2D Heat Transfer Conduction Simulations in Educational Environment. Appl. Sci. 2024, 14, 7159. [Google Scholar] [CrossRef]
- Luce, A.; Mahdavi, A.; Marquardt, F.; Wankerl, H. TMM-Fast, a transfer matrix computation package for multilayer thin-film optimization: Tutorial. J. Opt. Soc. Am. A 2022, 39, 1007–1013. [Google Scholar] [CrossRef]
- Thelen, F.; Zehl, R.; Bürgel, J.L.; Depla, D.; Ludwig, A. A python-based approach to sputter deposition simulations in combinatorial materials science. Surf. Coat. Technol. 2025, 503, 131998. [Google Scholar] [CrossRef]
- Ketkar, N.; Santana, E. Deep Learning with Python; Apress: Berkeley, CA, USA, 2017; Volume 1. [Google Scholar]
- Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V. Scikit-learn: Machine learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar]
- Raschka, S.; Mirjalili, V. Python Machine Learning: Machine Learning and Deep Learning with Python, Scikit-Learn, and TensorFlow 2; Packt Publishing Ltd: Birmingham, UK, 2019. [Google Scholar]
- Griffiths, D.J. Introduction to Electrodynamics; Cambridge University Press: Cambridge, UK, 2023. [Google Scholar]
- Zhao, B.; Sakurai, A.; Zhang, Z.M. Polarization Dependence of the Reflectance and Transmittance of Anisotropic Metamaterials. J. Thermophys. Heat Transf. 2015, 30, 240–246. [Google Scholar] [CrossRef]
- Fujiwara, H. Spectroscopic Ellipsometry: Principles and Applications; John Wiley & Sons: Hoboken, NJ, USA, 2007. [Google Scholar]
- Lindbloom, B. Rgb/xyz Matrices. Available online: http://www.brucelindbloom.com/index.html (accessed on 24 March 2025).
- Stockman, A.; Sharpe, L.T. Cone Spectral Sensitivities and Color Matching; Cambridge U. Press: Cambridge, UK, 1999; pp. 53–88. [Google Scholar]
- CIE2019. Colour-Matching Functions of CIE 1931 Standard Colorimetric Observer. Available online: https://doi.org/10.25039/CIE.DS.xvudnb9b (accessed on 24 March 2025).
- CIE2019. CIE Standard Illuminant D65. Available online: https://doi.org/10.25039/CIE.DS.hjfjmt59 (accessed on 24 March 2025).
- IEC 61966-2-1:1999; Multimetdia Systems and Equipment—Colour Measurement and Management—Part 2-1: Colour Management—Default RGB Colour Space—SRGB. CIE: Vienna, Austria, 1999.
- Arosa, Y.; de la Fuente, R. Refractive index spectroscopy and material dispersion in fused silica glass. Opt. Lett. 2020, 45, 4268–4271. [Google Scholar] [CrossRef]
- Polyanskiy, M.N. Refractiveindex.info database of optical constants. Sci. Data 2024, 11, 94. [Google Scholar] [CrossRef]
- Prasanth, A.; Meher, S.R.; Alex, Z.C. Experimental analysis of SnO2 coated LMR based fiber optic sensor for ethanol detection. Opt. Fiber Technol. 2021, 65, 102618. [Google Scholar] [CrossRef]
- Schinke, C.; Christian Peest, P.; Schmidt, J.; Brendel, R.; Bothe, K.; Vogt, M.R.; Kröger, I.; Winter, S.; Schirmacher, A.; Lim, S.; et al. Uncertainty analysis for the coefficient of band-to-band absorption of crystalline silicon. AIP Adv. 2015, 5, 067168. [Google Scholar] [CrossRef]
- Henrie, J.; Kellis, S.; Schultz, S.M.; Hawkins, A. Electronic color charts for dielectric films on silicon. Opt. Express 2004, 12, 1464–1469. [Google Scholar] [CrossRef]
- Ceresa, E.M.; Garbassi, F. AES/XPS Thickness measurement of the native oxide on single crystal Si wafers. Mater. Chem. Phys. 1983, 9, 371–385. [Google Scholar] [CrossRef]
- Morita, M.; Ohmi, T.; Hasegawa, E.; Kawakami, M.; Ohwada, M. Growth of native oxide on a silicon surface. J. Appl. Phys. 1990, 68, 1272–1281. [Google Scholar] [CrossRef]
- Aguilar, O.; de Castro, S.; Godoy, M.P.F.; Rebello Sousa Dias, M. Optoelectronic characterization of Zn1−xCdxO thin films as an alternative to photonic crystals in organic solar cells. Opt. Mater. Express 2019, 9, 3638–3648. [Google Scholar] [CrossRef]
- Head, S.; Keshavarz Hedayati, M. Inverse Design of Distributed Bragg Reflectors Using Deep Learning. Appl. Sci. 2022, 12, 4877. [Google Scholar] [CrossRef]
- Huang, Z.; Liu, X.; Zang, J. The inverse design of structural color using machine learning. Nanoscale 2019, 11, 21748–21758. [Google Scholar] [CrossRef]
- Liu, Z.; Zhu, D.; Raju, L.; Cai, W. Tackling Photonic Inverse Design with Machine Learning. Adv. Sci. 2021, 8, 2002923. [Google Scholar] [CrossRef]
- Xi, W.; Lee, Y.-J.; Yu, S.; Chen, Z.; Shiomi, J.; Kim, S.-K.; Hu, R. Ultrahigh-efficient material informatics inverse design of thermal metamaterials for visible-infrared-compatible camouflage. Nat. Commun. 2023, 14, 4694. [Google Scholar] [CrossRef]
- So, S.; Badloe, T.; Noh, J.; Bravo-Abad, J.; Rho, J. Deep learning enabled inverse design in nanophotonics. Nanophotonics 2020, 9, 1041–1057. [Google Scholar] [CrossRef]
- Gómez, P.; Toftevaag, H.; Bogen-Storø, T.; Egmond, D.; Llorens, J. Neural Inverse Design of Nanostructures (NIDN). Sci. Rep. 2022, 12, 22160. [Google Scholar] [CrossRef] [PubMed]
- Jiang, J.; Sell, D.; Hoyer, S.; Hickey, J.; Yang, J.; Fan, J. Free-Form Diffractive Metagrating Design Based on Generative Adversarial Networks. ACS Nano 2019, 13, 8872–8878. [Google Scholar] [CrossRef] [PubMed]
- Park, G.-T.; Kim, J.-H.; Lee, S.; Kim, D.I.; An, K.-S.; Lee, E.; Yim, S.; Kim, S.-K. Conformal Antireflective Multilayers for High-Numerical-Aperture Deep-Ultraviolet Lenses. Adv. Opt. Mater. 2024, 12, 2401040. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Lee, D.; Lee, S. Color Simulation of Multilayered Thin Films Using Python. Appl. Sci. 2025, 15, 4814. https://doi.org/10.3390/app15094814
Lee D, Lee S. Color Simulation of Multilayered Thin Films Using Python. Applied Sciences. 2025; 15(9):4814. https://doi.org/10.3390/app15094814
Chicago/Turabian StyleLee, Dongik, and Seunghun Lee. 2025. "Color Simulation of Multilayered Thin Films Using Python" Applied Sciences 15, no. 9: 4814. https://doi.org/10.3390/app15094814
APA StyleLee, D., & Lee, S. (2025). Color Simulation of Multilayered Thin Films Using Python. Applied Sciences, 15(9), 4814. https://doi.org/10.3390/app15094814