Glossary

sRGB

sRGB (Standard RGB) is a color space — a defined mapping from numeric red/green/blue values to actual perceived colors — that serves as the default assumption for the web, most consumer displays, and most image formats. Standardized as IEC 61966-2-1, it's why an RGB or hex value means (roughly) the same color across different unmanaged displays: without an agreed color space, the numbers 255, 0, 0 are meaningless on their own.

How it works

A color space defines both a gamut (the full range of colors it can represent) and a transfer function (how numeric values map to light intensity — sRGB uses a roughly 2.2-gamma curve, not a straight linear scale, which more closely matches how human vision perceives brightness differences). sRGB's gamut is intentionally modest compared to newer standards — it covers a smaller slice of the visible spectrum than wide-gamut spaces like Display P3 or Adobe RGB, which is a deliberate historical tradeoff for broad, consistent compatibility across cheap CRT and LCD displays going back decades.

CSS assumes sRGB by default for rgb(), hsl(), and hex colors; a wide-gamut color needs an explicit function like color(display-p3 1 0 0) to opt out of the sRGB assumption.

Common pitfalls

  • A color picked in a wide-gamut space (like a photo taken with a modern phone camera, often tagged Display P3) will look different — usually less saturated — once clamped into sRGB, which is what most web contexts still assume.
  • "More vivid than sRGB can represent" colors get silently clipped to the nearest representable sRGB value rather than raising an error, which can shift a design's intended color without any visible warning.
  • Gamma mismatches (treating sRGB's nonlinear values as if they were linear light) are a classic source of image-processing bugs — blending or resizing images incorrectly in gamma-encoded space produces slightly-wrong, muddy-looking results.
  • Not every display is properly color-calibrated to sRGB, so even "correct" sRGB values can look different across monitors — the color space is a specification, not a hardware guarantee.

Related terms

  • Hex color — the everyday CSS notation (#ff0000) for RGB values; those numbers are only meaningful because of an assumed color space, almost always sRGB.

See also

  • Tool: Color Picker — pick colors and copy them as hex, RGB, or HSL values, all interpreted in the standard sRGB color space.