sRGB
From Wikipedia, the free encyclopedia
sRGB is a standard RGB (Red Green Blue) color space created cooperatively by HP and Microsoft for use on monitors, printers, and the Internet.
sRGB uses the ITUR BT.7095 primaries, the same as are used in studio monitors and HDTV,^{[1]} and a transfer function (gamma curve) typical of CRTs. This specification allows sRGB to be directly displayed on typical monitors, a factor which greatly aided its acceptance.
Unlike most other RGB color spaces, the sRGB gamma can not be expressed as a single numerical value. The overall gamma is approximately 2.2, consisting of a linear (gamma 1.0) section near black, and a nonlinear section elsewhere involving a 2.4 exponent and a gamma (slope of log output versus log input) changing from 1.0 through about 2.3.
Contents 
[edit] Background
The sRGB color space has been endorsed by the W3C, Exif, Intel, Pantone, Corel, and many other industry players; it is used in proprietary and open graphics file formats, such as SVG.
The sRGB color space is well specified and is designed to match typical home and office viewing conditions, rather than the darker environment typically used for commercial color matching.
Nearly all software was and is designed with the assumption that an 8bitperchannel image file placed unchanged onto an 8bitperchannel display will appear much as the sRGB specification dictates. LCDs, digital cameras, printers, and scanners all follow the sRGB standard. Devices which do not naturally follow sRGB (as was the case for older CRT monitors) include compensating circuitry or software so that, in the end, they also obey this standard. For this reason, one can generally assume, in the absence of embedded profiles or any other information, that any 8bitperchannel image file or any 8bitperchannel image API or device interface can be treated as being in the sRGB color space. When an RGB color space with a larger gamut is needed, color management usually must be employed to map image data to appear correctly on the display.
[edit] The sRGB gamut
sRGB defines the chromaticities of the red, green, and blue primaries, the colors where one of the three channels is nonzero and the other two are zero. The gamut of chromaticities that can be represented in sRGB is the color triangle defined by these primaries. As with any RGB color space, for nonnegative values of R, G, and B it is not possible to represent colors outside this triangle, which is well inside the range of colors visible to a human.
Chromaticity  Red  Green  Blue  White point 

x  0.6400  0.3000  0.1500  0.3127 
y  0.3300  0.6000  0.0600  0.3290 
z  0.0300  0.1000  0.7900  0.3583 
sRGB also defines a nonlinear transformation between the intensity of these primaries and the actual number stored. The curve is similar to the gamma response of a CRT display. It is more important to replicate this curve than the primaries to get correct display of an sRGB image. This nonlinear conversion means that sRGB is a reasonably efficient use of the values in an integerbased image file to display humandiscernible light levels.
sRGB is sometimes avoided by highend print publishing professionals because its color gamut is not big enough, especially in the bluegreen colors, to include all the colors that can be reproduced in CMYK printing.
[edit] Specification of the transformation
[edit] The forward transformation (CIE xyY or CIE XYZ to sRGB)
The first step in the calculation of sRGB tristimulus values from the CIE XYZ tristimulus values is a linear transformation, which may be carried out by a matrix multiplication.^{[2]} Note that these linear values are not the final result.
Note also, that if the CIE xyY color space values are given (where x, y are the chromaticity coordinates and Y is the luminance), they must first be transformed to CIE XYZ tristimulus values by:
The intermediate parameters R_{linear}, G_{linear} and B_{linear} for ingamut colors are defined to be in the range [0,1], which means that the initial X, Y, and Z values need to be similarly scaled (if you start with XYZ values going to 100 or so, divide them by 100 first, or apply the matrix and then scale by a constant factor to the [0,1] range). The linear RGB values are usually clipped to that range, with display white represented as (1,1,1); the corresponding original XYZ values are such that white is D65 with unit luminance (X,Y,Z = 0.9505, 1.0000, 1.0890). Calculations assume the 2° standard colorimetric observer.^{[3]}
sRGB was designed to reflect a typical realworld monitor with a gamma of 2.2, and the following formula transforms the linear values into sRGB. Let C_{linear} be R_{linear}, G_{linear}, or B_{linear}, and C_{srgb} be R_{srgb},G_{srgb} or B_{srgb}:
 where
These gamma corrected values are in the range 0 to 1. If values in the range 0 to 255 are required, e.g. for video display or 8bit graphics, the usual technique is to multiply by 255 and round to an integer.
[edit] The reverse transformation
Again the sRGB component values R_{srgb}, G_{srgb}, B_{srgb} are in the range 0 to 1. (A range of 0 to 255 can simply be divided by 255).
where
[edit] Theory of the transformation
The transformation was designed to approximate a gamma of about 2.2, but with a linear portion near zero to avoid having an infinite slope at K = 0, which can cause numerical problems. The condition that g(K) match at some K_{0} is
where (using γ = 2.4) the standard value of φ = 12.92 which was used above, yields , and this is the transformation used. If we impose the condition that the slope match as well then we must have
We now have two equations. If we take the two unknowns to be K_{0} and φ then we can solve to give and . These values, with corresponding lineardomain threshold at K_{0} / φ = 0.00304, are sometimes used to describe sRGB conversion.^{[4]} Publications by sRGB's creators^{[2]} used this K_{0}, but rounded φ to 12.92, resulting in a small discontinuity in the curve. Some authors adopted these values in spite of the discontinuity.^{[5]} For the standard, the rounded φ=12.92 was kept and the K_{0} value was recomputed to make the resulting curve continuous, as described above, resulting in a slope discontinuity from 12.92 below the intersection to 12.70 above.
[edit] Viewing environment
Parameter  Value 

Luminance level  80 cd/m^{2} 
Illuminant white point  x = 0.3127, y = 0.3291 (D65) 
Image surround reflectance  20% (~medium gray) 
Encoding ambient illuminance level  64 lux 
Encoding ambient white point  x = 0.3457, y = 0.3585 (D50) 
Encoding viewing flare  1.0% 
Typical ambient illuminance level  200 lux 
Typical ambient white point  x = 0.3457, y = 0.3585 (D50) 
Typical viewing flare  5.0% 
The sRGB specification assumes a dimlylit encoding (creation) environment with an ambient correlated color temperature (CCT) of 5000K. It is interesting to note that this differs from the CCT of the illuminant (D65). Using D50 for both would have made the white point of most photographic paper appear excessively blue.^{[6]} 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 lessstringent typical viewing environment.^{[3]}
[edit] Usage
As the recommended color space for the Internet, sRGB should be used for editing and saving all images intended for publication to the WWW. Images intended for professional printing via a fully colormanaged workflow, e.g. prepress output, sometimes use another color space such as Adobe RGB (1998), which allows for a wider gamut.
Images intended for the Internet and created in one of the other color spaces may be converted to sRGB when editing, using a suitable editing program, e.g. Paint Shop Pro or Adobe Photoshop; ideally, the original nonsRGB file should be saved and the conversion to sRGB done on a copy, as some loss of image information occurs when converting to another color space.
Due to the standardization of sRGB on the Internet, on computers, and on printers, many low to mediumend consumer digital cameras and scanners use sRGB as the default (or only available) working color space. Used in conjunction with an inkjet printer, an sRGB image produces what is often regarded as satisfactory for home use. However, consumerlevel camera LCDs are typically uncalibrated, meaning that even though the image is being labelled as sRGB, one can't conclude that the image is coloraccurate on the LCD.
The two dominant programming interfaces for 3D graphics, OpenGL and Direct3D, have both incorporated sRGB. OpenGL 2.1 incorporates sRGB textures first introduced by the EXT_texture_sRGB extension. OpenGL's EXT_framebuffer_sRGB extension supports rendering into framebuffers assuming either a linear or sRGB color space. DirectX 9 supports sRGB textures and rendering into sRGB surfaces using Direct3D.
[edit] References
 ^ Charles A. Poynton (2003). Digital Video and HDTV: Algorithms and Interfaces. Morgan Kaufmann. ISBN 1558607927. http://books.google.com/books?id=ra1lcAwgvq4C&pg=RA1PA239&dq=rec+709+smpte&ei=Is3tRL1FIKswO9tKmxAg&sig=kLYqtDElqkFZN6AQ6zovMgrIjA4.
 ^ ^{a} ^{b} Michael Stokes, Matthew Anderson, Srinivasan Chandrasekar, Ricardo Motta (1996). "A Standard Default Color Space for the Internet  sRGB". http://www.w3.org/Graphics/Color/sRGB.
 ^ ^{a} ^{b} A Standard Default Color Space for the Internet: sRGB, Version 1.10, November 5, 1996. ICC
 ^ Phil Green and Lindsay W. MacDonald (2002). Colour Engineering: Achieving Device Independent Colour. John Wiley and Sons. ISBN 0471486884. http://books.google.com/books?id=tn09voxr6agC&pg=PA350&dq=srgb+0.03928+date:02002&as_brr=3&ei=2JztRrrzN6PKowKtx5C4Dw&sig=hTiEYxwCTToOLrvJkbu1mwRV0A.
 ^ Jon Y. Hardeberg (2001). Acquisition and Reproduction of Color Images: Colorimetric and Multispectral Approaches. UniversalPublishers.com. ISBN 1581121350. http://books.google.com/books?id=e2umTIdI2u4C&pg=PA40&dq=srgb+0.00304+date:02002&as_brr=3&ei=cJ7tRrH2BYqUogLM3tCuDw&sig=bEt3IcAina7GVMR1gM0Qby7A6M.
 ^ Rodney, Andrew (2005). Color Management for Photographers. Focal Press. p. 121. ISBN 9780240806495. http://books.google.com/books?id=jFl3v9sSEUC&pg=PA121&lpg=PA121&dq=%22My+suggestion+is+to+calibrate+to+a+D65+white+point.%22&source=web&ots=s7n9amrESd&sig=ImdsBHuq5XleR9Skrw0fyebPkEE&hl=en. "Why Calibrate Monitor to D65 When Light Booth is D50"
[edit] Standards
 IEC 6196621:1999 is the official specification of sRGB. It provides viewing environment, encoding, and colorimetric details.
 Amendment A1:2003 to IEC 6196621:1999 describes an analogous sYCC encoding for YCbCr color spaces, an extendedgamut RGB encoding, and a CIELAB transformation.
 The fourth working draft of IEC 6196621 is available online, but is not the complete standard.
[edit] External links
 International Color Consortium
 Archive copy of http://www.srgb.com, now unavailable, containing much information on the design, principles and use of sRGB
 A Standard Default Color Space for the Internet  sRGB
 OpenGL extension for sRGB textures
