SRGB Standard
   HOME

TheInfoList



OR:

sRGB (standard
RGB The RGB color model is an additive color model in which the red, green, and blue primary colors of light are added together in various ways to reproduce a broad array of colors. The name of the model comes from the initials of the three ...
) is a
colorspace A color space is a specific organization of colors. In combination with color profiling supported by various physical devices, it supports reproducible representations of colorwhether such representation entails an analog or a digital represen ...
, for use on monitors, printers, and the
World Wide Web The World Wide Web (WWW or simply the Web) is an information system that enables Content (media), content sharing over the Internet through user-friendly ways meant to appeal to users beyond Information technology, IT specialists and hobbyis ...
. It was initially proposed by HP and
Microsoft Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
in 1996 and became an official standard of the
International Electrotechnical Commission The International Electrotechnical Commission (IEC; ) is an international standards organization that prepares and publishes international standards for all electrical, electronics, electronic and related technologies. IEC standards cover a va ...
(IEC) as IEC 61966-2-1:1999. It is the current standard colorspace for the web, and it is usually the assumed colorspace for images that do not have an embedded color profile. The sRGB standard uses the same color primaries and white point as the
ITU-R BT.709 ITU-R Recommendation 709, usually abbreviated Rec. 709, BT.709, or ITU-R 709, is a standard developed by the Radiocommunication Sector of the International Telecommunication Union (ITU-R) for image encoding and signal characteristics ...
standard for
HDTV High-definition television (HDTV) describes a television or video system which provides a substantially higher image resolution than the previous generation of technologies. The term has been used since at least 1933; in more recent times, it ref ...
, but a different
transfer function In engineering, a transfer function (also known as system function or network function) of a system, sub-system, or component is a function (mathematics), mathematical function that mathematical model, models the system's output for each possible ...
(or
gamma Gamma (; uppercase , lowercase ; ) is the third letter of the Greek alphabet. In the system of Greek numerals it has a value of 3. In Ancient Greek, the letter gamma represented a voiced velar stop . In Modern Greek, this letter normally repr ...
) compatible with the era's
CRT display A cathode-ray tube (CRT) is a vacuum tube containing one or more electron guns, which emit electron beams that are manipulated to display images on a phosphorescent screen. The images may represent electrical waveforms on an oscilloscope, ...
s, and assumes a viewing environment closer to typical home and office viewing conditions. Matching the behavior of PC video cards and CRT displays greatly aided sRGB's popularity.


History

By the 1970s, most computers
translated Translation is the communication of the meaning of a source-language text by means of an equivalent target-language text. The English language draws a terminological distinction (which does not exist in every language) between ''transla ...
8-bit digital data fairly linearly to a signal that was sent to a video monitor. However video monitors and TVs produced a brightness that was not linear with the input signal, roughly a power law with an exponent between 2 and 3. The exponent was commonly denoted with the letter \gamma, hence the common name "gamma correction" for this function. This design has the benefit of displaying an image with much less visual artifacts, as it places the digital values closer together near black and further apart near white (where changes in brightness are less visible). This gamma varied according to CRT manufacturers, but was normalized in 1993 for use in HDTV systems, as the
ITU The International Telecommunication Union (ITU)In the other common languages of the ITU: * * is a specialized agency of the United Nations responsible for many matters related to information and communication technologies. It was established ...
BT.709 standard The BT.709 standard specified a decoding function with a linear section near zero, transitioning to a shifted power law with exponent 1/0.45 ≈ 2.22... sRGB was created a few years later by Hewlett-Packard and Microsoft. It was meant to describe the decoding function of most
CRT CRT or Crt most commonly refers to: * Cathode-ray tube, a display * Critical race theory, an academic framework of analysis CRT may also refer to: Law * Charitable remainder trust, United States * Civil Resolution Tribunal, Canada * Columbia ...
computer monitors used with Windows operating systems at the time, which was still different from that assumed by BT.709. The first draft of the standard was published in 1996. A fourth draft, still incomplete, is available online. Like the BT.709, the sRGB decoding function was defined as a linear section near zero that transitions to a shifted power law Actually using the sRGB standard became important as computer graphics software started to calculate in linear light levels in the late 1990s, and needed to use sRGB to convert from and to the common 8-bit image standards. Images such as shown here became popular for adjusting a CRT monitor to correctly display sRGB. Amendment 1 to IEC 61966-2-1:1999, approved in 2003, also defines a Yuv-style colorspace called
sYCC sYCC is a standard numerical encoding of colors, similar to the CIE YCbCr encoding, It uses three coordinates: a luma value Y, that is roughly proportional to perceived brightness of the color, and two chroma values C_b and C_r, which are rou ...
and a conversion to more than 8 bits called . The
scRGB scRGB is a wide color gamut RGB color space created by Microsoft and HP that uses the same color primaries and white/black points as the sRGB color space but allows coordinates below zero and greater than one. The full range is −0.5 through j ...
standard also tries to extend sRGB to more bits.


Definition


Transfer function ("gamma")

An sRGB image file contains values for each pixel. 0.0 is "black" while 1.0 is the intensity of a color primary needed by "white". These floating-point values are derived from the file data, for a typical 8-bit-per-channel image the bytes are divided by 255.0. The mapping from these values to intensity is a non-linear
transfer function In engineering, a transfer function (also known as system function or network function) of a system, sub-system, or component is a function (mathematics), mathematical function that mathematical model, models the system's output for each possible ...
which is the combination of a
linear function In mathematics, the term linear function refers to two distinct but related notions: * In calculus and related areas, a linear function is a function whose graph is a straight line, that is, a polynomial function of degree zero or one. For di ...
at low brightness values and a displaced
power law In statistics, a power law is a Function (mathematics), functional relationship between two quantities, where a Relative change and difference, relative change in one quantity results in a relative change in the other quantity proportional to the ...
for the rest of the range. Linear intensities are derived using (same for all channels): :R = \begin R'/12.92, & R' \le 0.04045 \\ mu\left(\frac\right) ^, & R' > 0.04045 \end This function is quite close to R'^. However, for low values near 0.04045 the difference is perceptible. The inverse function as defined by IEC2003 is: :R' = \begin 12.92 R, & R \le 0.0031308 \\ mu(1.055)R^ - 0.055, & R > 0.0031308 \end If needed by the file format, values greater than 1.0 can be used (the results will also be greater than 1.0), and values less than 0.0 can be converted as . These functions are similar to those of BT.709, but the values are noticeably different. Because of the rounding of the parameters, they have small discontinuities at the transition between the linear and non-linear part, on the order of 10−8, and they are not precise inverses of each other. These errors are too small to matter in practical situations. In practice many pieces of software use different close-by values (see below), or ignore the linear section, or use a plain gamma 2.2 function. The change in the images is almost imperceptible, however it will make noticeable seams when differently-converted images are overlapped, and mismatched translations back and forth accumulate color shifts. Many operating systems and programs send 8-bit sRGB images directly to video memory and assume this produces the correct levels.


Deriving the transfer function

A shifted power law curve that passes through is y = \left(\frac\right)^\gamma. The first draft of the sRGB standard chose \gamma= 2.4 and then computed C=0.055 so that the value at x=0.4 was near x^. A straight line that passes through , is y = x/A. The transition from the linear section to the power law section should be
continuous Continuity or continuous may refer to: Mathematics * Continuity (mathematics), the opposing concept to discreteness; common examples include ** Continuous probability distribution or random variable in probability and statistics ** Continuous ...
(without a sudden step) and smooth (without a sudden change of slope). To make it continuous when , we must have :\frac = \left(\frac\right)^\gamma To avoid a sudden change of slope where the two segments meet, the derivatives must also be equal at : :\frac = \gamma\left(\frac\right)^\left(\frac\right) Solving the two equations for and we get :X = \frac\;\;\;\;\; A = \frac This produces X \approx 0.0392857... and A \approx 12.9232102.... These values, rounded to X = 0.03928 and A = 12.92321 are still incorrectly given in some publications. However, the sRGB draft standard rounded A to 12.92, resulting in a small discontinuity in the curve. The first official version of the standard was defined and published by the IEC in 1999. In this version, the rounded value of A=12.92 was retained, but the breakpoint X was redefined as 0.04045 to make the curve approximately continuous. With these values, there is still a discontinuity in the slope, from 1/12.92 just below the intersection to 1/12.70 just above it. The final standard also corrected some small rounding errors present in the draft.


Primaries

The sRGB standard defines the chromaticities of the red, green, and blue
primaries Primary elections or primaries are elections held to determine which candidates will run in an upcoming general election. In a partisan primary, a political party selects a candidate. Depending on the state and/or party, there may be an "open pri ...
, the colors where one of the three channels is nonzero and the other two are zero. The
gamut In color reproduction and colorimetry, a gamut, or color gamut , is a convex set containing the colors that can be accurately represented, i.e. reproduced by an output device (e.g. printer or display) or measured by an input device (e.g. cam ...
of chromaticities that can be represented in sRGB is the
color triangle A color triangle is an arrangement of colors within a triangle, based on the additive or subtractive combination of three primary colors at its corners. An additive color space defined by three primary colors has a chromaticity gamut that is ...
defined by these primaries, which are set such that the range of colors inside the triangle is well within the range of colors visible to a human with normal
trichromatic Trichromacy or trichromatism is the possession of three independent channels for conveying color information, derived from the three different types of cone cells in the eye. Organisms with trichromacy are called trichromats. The normal expl ...
vision. As with any
RGB color space RGB color spaces are a category of additive colorimetric color spaces specifying part of its absolute color space definition using the RGB color model. RGB color spaces are commonly found describing the mapping of the RGB color model to human p ...
, for non-negative values of , , and it is not possible to represent colors outside this triangle. The primaries come from HDTV (
ITU-R BT.709 ITU-R Recommendation 709, usually abbreviated Rec. 709, BT.709, or ITU-R 709, is a standard developed by the Radiocommunication Sector of the International Telecommunication Union (ITU-R) for image encoding and signal characteristics ...
), which are somewhat different from those for older color TV systems ( ITU-R BT.601). These values were chosen to reflect the approximate color of consumer CRT phosphors at the time of its design. Since
flat-panel display A flat-panel display (FPD) is an electronic visual display, electronic display used to display device, display visual content such as text or images. It is present in consumer, medical, transportation, and industrial equipment. Flat-panel disp ...
s at the time were generally designed to emulate CRT characteristics, the values also reflected prevailing practice for other display devices as well. The sRGB standard specifies also the colors and relative intensities of the three primaries , , and , by defining the mapping between these values (in linear brightness scale, before the gamma encoding) and the
CIE XYZ In 1931, the International Commission on Illumination (CIE) published the CIE 1931 color spaces which define the relationship between the visible spectrum and human color vision. The CIE color spaces are mathematical models that comprise a "sta ...
perceptual color coordinates. This mapping is the same specified by the BT.709 standard; in matrix notation, : \begin X \\ Y \\ Z \end = \begin 0.4124 & 0.3576 & 0.1805 \\ 0.2126 & 0.7152 & 0.0722 \\ 0.0193 & 0.1192 & 0.9505 \end \begin R \\ G \\ B \end These coefficients should be considered exact and assume the 2°
standard colorimetric observer In 1931, the International Commission on Illumination (CIE) published the CIE 1931 color spaces which define the relationship between the visible spectrum and human color vision. The CIE color spaces are mathematical models that comprise a "stan ...
for CIE XYZ. In particular, the second row of this matrix specifies the computation of the BT.709-2 luma (brightness) value from the linear , , and values. (BT.709-1 had a typo in these coefficients.) The inverse conversion, from CIE XYZ to (linear) , can be obtained by inverting the matrix above to a suitable numerical accuracy. The 1999 standard provides the matrix : \begin R \\ G \\ B \end = \begin +3.2406 & -1.5372 & -0.4986 \\ -0.9689 & +1.8758 & +0.0415 \\ +0.0557 & -0.2040 & +1.0570 \end \begin X \\ Y \\ Z \end which is not the exact inverse of the sRGB to XYZ transformation, but was expected to be accurate enough for 8-bit encoded samples (with M=255). The 1999 IEC standard was amended in 2003. The sRGB to CIE XYZ matrix was retained, but the inverse transformation above was replaced by a more accurate version, with seven decimal fraction digits. It provides the matrix : \begin R \\ G \\ B \end = \begin +3.2406255 & -1.5372080 & -0.4986286 \\ -0.9689307 & +1.8757561 & +0.0415175 \\ +0.0557101 & -0.2040211 & +1.0569959 \end \begin X \\ Y \\ Z \end . which is claimed to be sufficiently accurate for 16-bit samples. For these formulas, the ''X'', ''Y'', and ''Z'' values must be scaled so that the ''Y'' of D65 ("white") is 1.0 (''X'' = 0.9505, ''Y'' = 1.0000, ''Z'' = 1.0890). This is usually true but some color spaces use 100 or other values (such as in
CIELAB The CIELAB color space, also referred to as ''L*a*b*'', is a color space defined by the International Commission on Illumination (abbreviated CIE) in 1976. It expresses color as three values: ''L*'' for perceptual lightness and ''a*'' and ''b* ...
, when using specified white points).


Viewing environment

The sRGB specification assumes a dimly lit encoding (creation) environment with an ambient correlated color temperature (CCT) of 5003 K: The assumed ambient CCT differs from that of the BT.709 standard illuminant ( D65), which is still retained for the screen white point. Using D50 for both would have made the white point of most photographic paper appear excessively blue. The other parameters, such as the luminance level, are representative of a typical CRT monitor. For optimal results, the ICC recommends using the encoding viewing environment (i.e., dim, diffuse lighting) rather than the less-stringent typical viewing environment.


Translation to integers

Most file formats that use sRGB store 8-bit integers. Usually these are converted from 8 bits by dividing by 255.0, and converted to 8 bits by multiplying by 255 and rounding. However some software converts to 8 bits by multiplying by 256 and rounding down. Higher-quality software often uses
dithering Dither is an intentionally applied form of noise used to randomize quantization error, preventing large-scale patterns such as color banding in images. Dither is routinely used in processing of both digital audio and video data, and is often ...
when writing so that
color banding Colour banding is a subtle form of posterization in digital images, caused by the colour of each pixel being rounded to the nearest of the digital colour levels. While posterization is often done for artistic effect, colour banding is an und ...
is hidden. Annex G of the 2003 amendment of the sRGB standard describes an alternative encoding of color values, called bg-sRGB, that is recommended when the number of bits per channel is 10 or more. In this case 0.0 is mapped to a ''black point'' and 1.0 is mapped to a ''white point'' , with all other values interpreted linearly. For 10 bits and is specified, and for larger numbers of bits: : K = 3\times 2^\quad\quad W = K + 255\times 2^ The 12-bit
scRGB scRGB is a wide color gamut RGB color space created by Microsoft and HP that uses the same color primaries and white/black points as the sRGB color space but allows coordinates below zero and greater than one. The full range is −0.5 through j ...
format does something similar, with and . Allowing numbers greater than 1.0 allows
high dynamic range High dynamic range (HDR), also known as wide dynamic range, extended dynamic range, or expanded dynamic range, is a signal with a higher dynamic range than usual. The term is often used in discussing the dynamic ranges of images, videos, audio o ...
images, and negative numbers allows colors outside the gamut triangle.


Usage

Due to the standardization of sRGB on the Internet, on computers, and on printers, many low- to medium-end consumer
digital camera A digital camera, also called a digicam, is a camera that captures photographs in Digital data storage, digital memory. Most cameras produced today are digital, largely replacing those that capture images on photographic film or film stock. Dig ...
s and
scanners ''Scanners'' is a 1981 Canadian science fiction horror film written and directed by David Cronenberg and starring Stephen Lack, Jennifer O'Neill, Michael Ironside, and Patrick McGoohan. In the film, "scanners" are psychics with unusual telep ...
use sRGB as the
default Default may refer to: Law * Default (law), the failure to do something required by law ** Default (finance), failure to satisfy the terms of a loan obligation or failure to pay back a loan ** Default judgment, a binding judgment in favor of eit ...
(or only available) working color space. If the color space of an image is unknown and encoded with 8 bits in each channel, the sRGB encoding can be assumed. Due to programmers misunderstanding the meaning of "gamma" some image files that claim they contain a gamma of 1.0 should also be assumed to be sRGB. As the sRGB gamut mostly meets or exceeds the gamut of a low-end
inkjet printer Inkjet printing is a type of printer (computing), computer printing that recreates a digital image by propelling droplets of ink onto paper or plastic substrates. Inkjet printers were the most commonly used type of printer in 2008, and range f ...
, an sRGB image is often regarded as satisfactory for home printing. The sRGB color space is sometimes avoided by high-end print publishing professionals because its color gamut is not big enough, especially in the blue-green colors, to include all the colors that can be reproduced in
CMYK The CMYK color model (also known as process color, or four color) is a subtractive color model, based on the CMY color model, used in color printing, and is also used to describe the printing process itself. The abbreviation ''CMYK'' refers ...
printing. Images intended for professional printing via a fully color-managed workflow (e.g.
prepress Prepress is the term used in the printing and publishing industries for the processes and procedures that occur between the creation of a print layout and the final printing. The prepress process includes the preparation of artwork for press, media ...
output) sometimes use another color space such as Adobe RGB (1998), which accommodates a wider gamut and CMYK color space like Fogra39.


Programming interface support

The two dominant programming interfaces for 3D graphics,
OpenGL OpenGL (Open Graphics Library) is a Language-independent specification, cross-language, cross-platform application programming interface (API) for rendering 2D computer graphics, 2D and 3D computer graphics, 3D vector graphics. The API is typic ...
and
Direct3D Direct3D is a graphics application programming interface (API) for Microsoft Windows. Part of DirectX, Direct3D is used to render three-dimensional graphics in applications where performance is important, such as games. Direct3D uses hardware ...
, have both incorporated support for the sRGB gamma curve. OpenGL supports textures with sRGB gamma encoded color components (first introduced with EXT_texture_sRGB extension, added to the core in OpenGL 2.1) and rendering into sRGB gamma encoded
framebuffer A framebuffer (frame buffer, or sometimes framestore) is a portion of random-access memory (RAM) containing a bitmap that drives a video display. It is a memory buffer containing data representing all the pixels in a complete video frame. Mode ...
s (first introduced with EXT_framebuffer_sRGB extension, added to the core in OpenGL 3.0). Correct
mipmap In computer graphics, a mipmap (''mip'' being an acronym of the Latin phrase ''multum in parvo'', meaning "much in little") is a pre-calculated, optimized sequence of images, each of which has an image resolution which is a factor of two small ...
ping and
interpolation In the mathematics, mathematical field of numerical analysis, interpolation is a type of estimation, a method of constructing (finding) new data points based on the range of a discrete set of known data points. In engineering and science, one ...
of sRGB gamma textures has direct hardware support in texturing units of most modern
GPU A graphics processing unit (GPU) is a specialized electronic circuit designed for digital image processing and to accelerate computer graphics, being present either as a discrete video card or embedded on motherboards, mobile phones, personal ...
s (for example nVidia GeForce 8 performs conversion from 8-bit texture to linear values before interpolating those values), and does not have any performance penalty.


ICC profiles

A
lookup table In computer science, a lookup table (LUT) is an array data structure, array that replaces runtime (program lifecycle phase), runtime computation of a mathematical function (mathematics), function with a simpler array indexing operation, in a proc ...
may be used to efficiently convert sRGB to other color spaces. The
International Color Consortium The International Color Consortium (ICC) was formed in 1993 by eight vendors in order to create an open, vendor-neutral color management system which would function transparently across all operating systems and software packages. Overview Th ...
(ICC) has published color profiles for this purpose, which are widely used. There are several variants, including ICCmax, version 4, and version 2. Version 4 is generally recommended, but version 2 is still commonly used and is the most compatible with other software including browsers. However, inconsistencies have been pointed out between those ICC profiles and the IEC sRGB standard. In particular, version 2 of the ICC profile specification does not implement the piecewise parametric curve encoding ("para") as specified by the IEC sRGB standard, and has to implement the sRGB transfer function using a one-dimensional lookup table. Some implementations approximate the transfer function as 2.2 gamma, with no linear portion, called "simplified sRGB".


References

fourth working draft (4WD) for 2CD of IEC 61966-2-1
(archived). Still not the complete standard.
. The first official specification of sRGB. Replaces the version IEC 61966-2-1:1999, introducing the sYCC encoding for
YCbCr YCbCr, Y′CbCr, also written as YCBCR or Y′CBCR, is a family of color spaces used as a part of the color image pipeline in digital video and digital photography, photography systems. Like YPbPr, YPBPR, it is based on RGB primaries; the two ...
color spaces, an extended-
gamut In color reproduction and colorimetry, a gamut, or color gamut , is a convex set containing the colors that can be accurately represented, i.e. reproduced by an output device (e.g. printer or display) or measured by an input device (e.g. cam ...
RGB encoding bg-sRGB, and a
CIELAB The CIELAB color space, also referred to as ''L*a*b*'', is a color space defined by the International Commission on Illumination (abbreviated CIE) in 1976. It expresses color as three values: ''L*'' for perceptual lightness and ''a*'' and ''b* ...
transformation.
Jason Summers (2012):
A close look at the sRGB formula
. Online document at entropymine.com. Accessed on 2014-12-17
archived
Daniele Siragusano (2020):
Colour Online: sRGB... We Need To Talk
. YouTube video of talk (2020-07-17, 57 min) discussing mismatch between sRGB and actual monitor transfer functions. Posted in channel @FilmLight. Accessed on 2024-12-17.
NumFocus Colour Science (2015):
The Importance of Terminology and sRGB Uncertainty
. Online document at www.colour-science.org, dated 2015-12-05. Accessed on 2024-12-17
archived
.
sRGB.com Notes on design and use of sRGB
(archived) by HP.
Image Engineering GmbH (2012):
Color spaces - REC.709 vs. sRGB
Online document at www.image-engineering.de. Includes a graph comparing two transfer functions. Accessed on 2024-12-17.
International Color Consortium (undated):
sRGB profiles
. Summary page at color.org. Accessed on 2014-12-17 (archiving failed).
International Color Consortium (undated):
sRGB
Summary page at color.org. Accessed on 2014-12-17 (archiving failed).
International Color Consortium (2015):
How to interpret the sRGB color space (specified in IEC 61966-2-1) for ICC profiles
. Online document at www.color.org. Accessed on 2024-12-17
archived

by Bruce Justin Lindbloom

by Elle Stone. Analyzes the inconsistency among sRGB ICC profiles


External links


Test that shows whether your display is pure 2.2 gamma or sRGB (~2.2 gamma)
on Shadertoy {{Color space 1996 introductions Color space Film and video technology