HEX to RGB & Linear Color Engine
Deconstruct hex codes into sRGB channels, linear photon irradiance, CIE XYZ coordinates, and dominant spectral wavelength.
The Physics of Digital Color Spaces
Digital monitors use three narrow phosphor or LED emission bands (Red, Green, Blue) to stimulate human photoreceptors. However, human brightness perception is non-linear: we are far more sensitive to subtle differences in dark shades than in bright highlights.
Gamma Decompanding (IEC 61966-2-1)
sRGB → LinearConverts 8-bit encoded display values CsRGB into linear photon irradiance Clinear:
- • CsRGB = normalized non-linear channel (C8-bit / 255 ∈ [0, 1])
- • Clinear = physical photon radiance (0.0 … 1.0)
- • γ = 2.4 = IEC exponent with linear toe slope of 12.92
Forward Gamma Companding
Linear → sRGBEncodes physical linear light Clinear into perceptual sRGB for computer display:
- • C8-bit = round(CsRGB · 255) ∈ [0, 255]
- • Rendering: Wave optics and dispersion must always use Linear RGB

Physics Teacher & Educational Technologist • Brăila, Romania
Related Physics Calculators
Convert 620 nm pure spectral wavelength to sRGB.
620 nmConvert frequency-doubled Nd:YAG laser green to sRGB.
532 nmCheck photometric contrast ratio between foreground and background colors.
WCAG 2.1Calculate speed, frequency, and wavelength across all media.
v = f · λ