Light & Optics Silo380 nm – 750 nm400 THz – 790 THz

Light Lab

Electromagnetic spectrum calculators built on the CIE 1931 2° Standard Observer, standard sRGB colorimetry (IEC 61966-2-1), and quantum photon energy relations (E = h · f).

380–750 nm

Wavelength to RGB

Approximate any visible wavelength (380–750nm) in sRGB and calculate CIE XYZ tristimulus coordinates, THz frequency, and eV photon energy.

Launch Wavelength Calculator
sRGB Gamma

HEX to Linear RGB & XYZ

Decompand non-linear sRGB gammas (γ ≈ 2.2) into physical photon irradiance, HSL components, and dominant spectral wavelength.

Launch Linear Color Engine
WCAG 2.1

WCAG Contrast Checker

Verify relative photometric luminance ratios (1:1 to 21:1) against W3C AA and AAA accessibility requirements with live visual preview.

Launch Contrast Checker

Physical Reference Wavelengths

NIST & Laser Emission Standards

Curated Spectral Wavelength Index

Browse scientifically significant wavelengths. Any integer value from 380–750 nm remains available in the calculator.

Understanding the calculations

From physical wavelength to a color on your screen

Light Lab connects three related but different descriptions of light: its physical wavelength, the response of a standard human observer, and the RGB signal used by a digital display. Keeping those stages separate is essential because a wavelength is a property of electromagnetic radiation, while an RGB value is a device-dependent instruction for three display primaries.

Wavelength, frequency, and photon energy

In vacuum, wavelength λ and frequency f are related by c = λf, where the speed of light is exactly 299,792,458 m/s. Increasing wavelength therefore lowers frequency. Photon energy follows the Planck–Einstein relation E = hf, so violet photons carry more energy per photon than red photons.

The wavelength calculator performs these conversions directly and reports frequency in terahertz and energy in electron-volts. These quantities describe a monochromatic source in vacuum; propagation through glass, water, or another medium changes wavelength through the refractive index while frequency remains fixed at the boundary.

Why wavelength-to-RGB is an approximation

The CIE 1931 Standard Observer models average color matching with three color-matching functions. A monochromatic wavelength can be represented by XYZ tristimulus coordinates, but many saturated points on the spectral locus fall outside the triangular gamut of a normal sRGB display. There is therefore no universally exact HEX code for a physical wavelength.

Wave Lab maps the calculated XYZ direction into the available sRGB gamut, normalizes it for display, and applies the standard sRGB transfer function. The preview preserves the approximate hue relationship, not the original radiometric brightness or spectral purity. Monitor calibration, ambient light, display technology, and individual vision can all change the perceived result.

Digital color and accessibility

The HEX converter starts from an existing sRGB color rather than a wavelength. It removes the nonlinear sRGB encoding to recover linear channel values, then converts them to CIE XYZ using the D65 reference white. The contrast checker uses relative luminance to compare two interface colors against WCAG thresholds. Contrast is a property of the displayed color pair and should not be inferred from spectral wavelength alone.

Choosing the right tool

  • Wavelength to RGB: explore spectrum position, frequency, photon energy, and an sRGB approximation.
  • HEX to RGB & XYZ: inspect the encoded and linear components of a digital color.
  • Contrast checker: test practical text and background combinations for accessibility.
Continue learningWhy color temperature is not a wavelengthRead the guide