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.