A computational framework for rendering sRGB color from physical light spectra


LİŞESİVDİN B., LİŞESİVDİN S. B.

Journal of Optoelectronics and Advanced Materials, vol.28, no.5-6, pp.251-260, 2026 (SCI-Expanded, Scopus)

  • Publication Type: Article / Article
  • Volume: 28 Issue: 5-6
  • Publication Date: 2026
  • Journal Name: Journal of Optoelectronics and Advanced Materials
  • Journal Indexes: Science Citation Index Expanded (SCI-EXPANDED), Scopus, Compendex
  • Page Numbers: pp.251-260
  • Keywords: CIE 1931 color space, Spectral power distribution, XYZ to sRGB conversion
  • Gazi University Affiliated: Yes

Abstract

This study introduces a computational method to convert any spectral power distribution (SPD) into its corresponding sRGB color, with practical applications in photonics, material science, and display engineering. Using Python libraries for numerical calculations, interpolation, and visualization, spectral data with the CIE color-matching functions were computed to derive tristimulus values. A matrix transformation from XYZ to the sRGB color space is then applied, followed by normalization and gamma correction to ensure precision. The method shows consistent results across various test spectra with different peak features. Four illustrative examples are provided to demonstrate the accuracy and adaptability of the approach.