Color Converter & Color Measurement

Type a color in any format, or pick one, and every other format updates: HEX, RGB, HSV, HSL, CMYK, CIE XYZ, xyY, CIELAB, and LCh. The diagrams show where the color sits in each system, the ΔE panel measures how far apart two colors are, and the spectrum panel turns a measured reflectance or transmittance curve into a color. Below, a guide explains what each code means and how cameras and spectrophotometers measure color, including on low-e coated glass.

Color

#3366CC
HEX
RGB
R 0–255
G
B
HSV
H °
S %
V %
HSL
H °
S %
L %
CMYK
C %
M %
Y %
K %
CIELAB
L*
a*
b*
LCh
L*
C*
h °
XYZ
X
Y
Z
xyY
x
y
Y

sRGB with a D65 white point. XYZ is scaled so white is Y = 100; CIELAB and LCh use D65 and the 2° observer.

Pick and adjust

R
G
B

The square varies saturation (left to right) and value (top to bottom) at the hue chosen on the strip. The sliders show how each RGB channel changes the color: additive mixing of red, green, and blue light.

CIE 1931 chromaticity diagram

The horseshoe is every color the eye can see, with pure spectral colors on its edge (wavelengths in nm). The triangle is the sRGB gamut that screens and hex codes can show. White (D65) sits near the middle. ● current color, ○ reference.

CIELAB a*b* plane

L* —

A slice through color space at the current lightness L*. +a* is red, −a* green, +b* yellow, −b* blue; distance from the center is chroma. Faded areas fall outside sRGB. The line joins the current color to the reference, and its length is ΔE*ab.

Color difference (ΔE)

Hex code, or L*, a*, b* separated by commas.
ΔE00 (CIEDE2000)—
ΔE*ab (CIE 1976)—
ΔL* · Δa* · Δb* sample − reference—
ΔC* · ΔH* chroma, hue—

Color from a measured spectrum

Paste wavelength and reflectance or transmittance from a spectrophotometer, one pair per line (nm or µm; fraction or %). The color is computed the way a spectrophotometer does it: the spectrum is weighted by the D65 illuminant and the CIE 1931 2° color-matching functions from 380 to 780 nm.

What the color codes mean

Every code above describes the same color in a different coordinate system. Some describe the signal sent to a display; others describe what a standard observer sees.

CodeWhat it encodesDevice-independent?Typical use
HEXThe three sRGB channel values (0–255) written in base 16: #RRGGBB.Only through sRGBWeb and software colors
RGBRed, green, and blue drive levels, gamma-encoded. #3366CC is R 51, G 102, B 204.Only when the space is named (sRGB, Adobe RGB, camera RGB)Displays, cameras, image files
HSV / HSBRGB rearranged as a cylinder: hue angle, saturation, and value (the largest channel).No, inherits RGBColor pickers, simple machine-vision thresholds
HSLLike HSV, but lightness is the average of the largest and smallest channels, so full saturation sits at L = 50 %.NoCSS, design tools
CMYKCyan, magenta, yellow, and black ink coverage. The formula here is the naive conversion; real printing needs an ICC profile.No, depends on inks and paperPrint
XYZCIE tristimulus values: the eye's response, computed from a spectrum. Y is luminance.YesThe hub that every other space converts through
xyYChromaticity (x, y) plus luminance Y; x and y are XYZ normalized to sum to one.YesGamut diagrams, LED and display specs
CIELABL* lightness, a* red–green, b* yellow–blue, built so equal distances look roughly equally different.Yes, with a stated illuminant and observerColor tolerances, coatings, plastics, paint, QC
LChCIELAB in polar form: lightness, chroma (distance from gray), and hue angle.YesDescribing shifts as lighter, more saturated, or hue-shifted

sRGB values are gamma-encoded, so channel value 128 is only about 22 % of full light. Conversions to XYZ first linearize each channel,

\[ C_\text{lin} = \begin{cases} C/12.92 & C \le 0.04045 \\ \left(\dfrac{C + 0.055}{1.055}\right)^{2.4} & C > 0.04045 \end{cases} \]

then apply the sRGB-to-XYZ matrix. CIELAB follows from XYZ and the white point \((X_n, Y_n, Z_n)\):

\[ L^* = 116 f\!\left(\tfrac{Y}{Y_n}\right) - 16, \quad a^* = 500\left[f\!\left(\tfrac{X}{X_n}\right) - f\!\left(\tfrac{Y}{Y_n}\right)\right], \quad b^* = 200\left[f\!\left(\tfrac{Y}{Y_n}\right) - f\!\left(\tfrac{Z}{Z_n}\right)\right], \]

where \(f(t) = t^{1/3}\) above a small threshold and linear below it. Many CIELAB colors, especially saturated cyans and greens, fall outside sRGB. They cannot be shown exactly on a typical screen or written as a hex code, which is why the converter flags out-of-gamut colors.

Hue in HSV is not hue in CIELAB

HSV and HSL are geometric rearrangements of RGB, not models of perception. A fully saturated yellow and a fully saturated blue both have V = 100 %, but yellow looks far lighter (L* 97 against 32). Equal steps in HSV hue are not equal perceived steps, and HSV hue angles do not match CIELAB hue angles. Use HSV for quick thresholds on images taken under fixed conditions; use CIELAB and ΔE when the numbers must match what people see or what another instrument reports.

Color difference: ΔE*ab and ΔE00

The simplest color difference is the straight-line distance in CIELAB, \(\Delta E^*_{ab} = \sqrt{\Delta L^{*2} + \Delta a^{*2} + \Delta b^{*2}}\). CIELAB is not perfectly uniform: the eye is more sensitive to hue differences near neutral and less sensitive in saturated colors. CIEDE2000 (ΔE00) corrects this with weighting functions for lightness, chroma, and hue and a rotation term for blues. As a rule of thumb, ΔE00 below 1 is not perceptible to most observers, 1–2 is visible on close side-by-side inspection, and above about 3.5 is obvious. Production tolerances are usually set against a master sample and an agreed ΔE, with separate limits on ΔL*, Δa*, and Δb* when one direction matters more.

How instruments measure color

Spectrophotometers measure the reflectance or transmittance spectrum, typically every 10 nm from 360 or 400 to 700 or 780 nm, and compute XYZ by weighting it with a standard illuminant and observer (the method of ASTM E308 and CIE 15). Because they measure the spectrum, any illuminant and observer can be computed afterward, and readings from different instruments agree to within a few tenths of a ΔE when geometry and calibration match. Measurement geometry matters: d/8° integrating-sphere instruments can include (SCI) or exclude (SCE) the specular reflection, while 45°/0° instruments mimic visual viewing and exclude gloss. Always report the illuminant, the observer (2° or 10°), and the geometry with the numbers.

Handheld spectrophotometers are the lab and QC reference. They press against the sample with a fixed aperture and their own calibrated light source. Inline (non-contact) spectrophotometers measure on a moving line from a fixed standoff. They need a stable distance and tilt, a defined geometry, and regular checks against reference tiles, but they give the same device-independent CIELAB as a handheld instrument, continuously.

Cameras report device RGB, not CIE values. A camera's red, green, and blue filters do not match the CIE color-matching functions, and auto exposure, auto white balance, gamma, and changes in lighting all move the numbers. As a result, HSV or RGB values from a camera often have no simple, let alone linear, relationship to CIELAB from a spectrophotometer, even when both track the same physical change. Cameras work well for relative color control: lock exposure, gain, and white balance, use a stable enclosed light source, read linear (raw) values, and compare each part to reference samples in the same image. For absolute color, characterize the camera against a color target to build a correction matrix, and verify it against a spectrophotometer over the range of colors you produce.

Measuring the color of low-e coated glass

A low-e coating is a stack of thin silver and dielectric layers, and its color comes from thin-film interference. A few nanometers of change in a dielectric layer moves a* and b* by a unit or more, so color is one of the most sensitive production checks of coating thickness and uniformity. Silver thickness also sets the sheet resistance and emissivity (see the sheet resistance tool), so color and sheet resistance together track most of what can drift in a coater.

The glazing performance calculator computes transmitted and reflected CIELAB for full glazing units, and the spectrum panel above converts any measured curve to color.

References

  1. CIE 015:2018, Colorimetry, 4th ed.; ISO/CIE 11664-4 (CIELAB) and ISO/CIE 11664-6 (CIEDE2000).
  2. G. Sharma, W. Wu, and E. N. Dalal, “The CIEDE2000 color-difference formula: Implementation notes, supplementary test data, and mathematical observations,” Color Res. Appl. 30, 21–30 (2005).
  3. IEC 61966-2-1, Default RGB colour space — sRGB.
  4. ASTM E308, Standard Practice for Computing the Colors of Objects by Using the CIE System; ASTM E1164, Standard Practice for Obtaining Spectrometric Data for Object-Color Evaluation.
  5. R. S. Berns, Billmeyer and Saltzman's Principles of Color Technology, 4th ed., Wiley (2019).