All Topics  
SRGB color space

 

   Email Print
   Bookmark   Link

 

SRGB color space


 
 



sRGB is a standard RGB (Red Green Blue) color space created cooperatively by HPHewlett-Packard

The Hewlett-Packard Company , commonly known as HP, is one of the world's largest information technology corporations....
 and MicrosoftMicrosoft

company_name = Microsoft Corporation| company_logo = ...
 for use on monitors, printers, and the InternetFacts About Internet

The Internet is the worldwide, publicly accessible network of interconnected computer networks that transmit data by packet ...
.

sRGB uses the ITU-R BT.709-5Facts About Rec. 709

ITU-R Recommendation BT.709, more commonly know by the abbreviations Rec. 709 or BT.709, standardizes the f...
 primaries, the same as are used in studio monitors and HDTV, and a transfer function typical of CRTCRT

CRT can mean:* Capillary refill time, in medicine...
s. This specification allows sRGB to be directly displayed on typical monitors, a factor which greatly aided its acceptance.

Unlike most other RGB color spaceRGB color space

An RGB color space is any additive color space based on the RGB color model....
s, the sRGB gammaGamma correction

Gamma correction, gamma nonlinearity, gamma encoding, or often simply gamma, is the name of a nonlinear op...
 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 non-linear 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.

Background

The sRGB color space has been endorsed by the W3C, Exif, Intel, PantonePantone

Pantone Inc., a multi-billion-dollar corporation headquartered in Carlstadt, New Jersey, is known for its Pantone colo...
, CorelCorel

Corel Corporation is a computer software company headquartered in Ottawa, Ontario, Canada....
, and many other industry players, and is well accepted and supported by Free SoftwareFree software Overview

Free software, as defined by the Free Software Foundation, is software which can be used, copied, studied, modified and redi...
 such as GIMPGIMP

The GNU Image Manipulation Program or just GIMP is a free software raster image editor....
, and is used in proprietary and open graphics file formats such as SVGScalable Vector Graphics

Scalable Vector Graphics is an XML markup language for describing two-dimensional vector graphics, both static and animated...
.

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 8-bit-per-channel image file placed unchanged onto an 8-bit-per-channel display will appear much as the sRGB specification dictates. LCDs, digital camerasDigital photography

Digital photography, as opposed to film photography, uses electronic devices to record the image as binary data....
, 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 8-bit-per-channel image file, or any 8-bit-per-channel 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.

The sRGB gamut

sRGB defines the chromaticities of the red, green, and blue primariesPrimary color

A primary color or colour is a color that cannot be created by mixing other colors in the gamut of a given color space...
, the colors where one of the three channels is nonzero and the other two are zero. The gamutGamut

In computer graphics, the gamut, or color gamut, is a certain complete subset of colors....
 of chromaticities that can be represented in sRGB is the color triangleColor triangle

A color triangle is an arrangement of colors within a triangle, based on the additive combination of three primary colors at...
 defined by these primaries. As with any RGB color spaceRGB color space

An RGB color space is any additive color space based on the RGB color model....
, for non-negative 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.

ChromaticityFacts About CIE 1931 color space

In the study of the perception of color, one of the first mathematically defined color spaces was the CIE XYZ color space, c...
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 integer-based image file to display human-discernible light levels.

sRGB 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 printing. See RGB color spaceRGB color space Summary

An RGB color space is any additive color space based on the RGB color model....
 for the view that Adobe RGB is a preferred color space for publishing.

Specification of the transformation

The forward transformation (CIE xyY or CIE XYZ to sRGB)

The first step in the calculation of sRGB tristimulus values from the CIE XYZCIE 1931 color space

In the study of the perception of color, one of the first mathematically defined color spaces was the CIE XYZ color space, c...
 tristimulus values is a linear transformation, which may be carried out by a matrix multiplication. 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 luminanceLuminance

Luminance is a photometric measure of the density of luminous intensity in a given direction....
), they must first be transformed to CIE XYZ tristimulus values by:

The intermediate parameters , and for in-gamut 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 D65D65

D65 is one of the standard illuminants defined by the International Commission on Illumination inside a series of illuminant...
 with unit luminance (X,Y,Z = 0.9505, 1.0000, 1.0890). Calculations assume the 2° standard colorimetric observer.

sRGB was designed to reflect a typical real-world monitor with a gamma of 2.2, and the following formula transforms the linear values into sRGB. Let be , , or , and be , or :

  • 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 8-bit graphics, the usual technique is to multiply by 255 and round to an integer.

The reverse transformation

Again the sRGB component values , , are in the range 0 to 1. (A range of 0 to 255 can simply be divided by 255).

where

or, expressed in other terms

where ? = 2.4 and f = 12.92

Theory of the transformation

The transformation was designed to approximate a gammaGamma correction

Gamma correction, gamma nonlinearity, gamma encoding, or often simply gamma, is the name of a nonlinear op...
 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 K0 is

where (using ) the standard value of 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 and then we can solve to give and . These values, with corresponding linear-domain threshold at , are sometimes used to describe sRGB conversion. Publications by sRGB's creators used this , but rounded to 12.92, resulting in a small discontinuity in the curve. Some authors adopted these values in spite of the discontinuity. For the standard, the rounded =12.92 was kept and the 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.

Viewing environment

Parameter Value
Luminance level 80 cd/m2
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 dimly-lit 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. 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.

Usage

As the recommended color space for the Internet, sRGB should be used for editingDigital image editing

Digital image editing is the process of altering digital images, whether they be digital photographs or other types of digit...
 and saving all images intended for publication to the WWW; however, due to sRGB's somewhat limited gamutGamut

In computer graphics, the gamut, or color gamut, is a certain complete subset of colors....
, images intended for professional printing via a fully color-managed workflow, e.g., prepressPrepress Summary

Prepress is the term used in the printing and publishing industries for the processes and procedures that occur between the ...
 output, should choose another color space such as Adobe RGB (1998)Adobe RGB color space

The Adobe RGB color space is an RGB color space developed by Adobe Systems in 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 ProCorel Paint Shop Pro

Paint Shop Pro is a bitmap graphics editor and vector graphics editor for computers running the Microsoft Windows operating...
 or Adobe PhotoshopAdobe Photoshop

Adobe Photoshop, or simply Photoshop, is a graphics editor developed and published by Adobe Systems....
; ideally, the original non-sRGB file should be saved and the conversion to sRGB done on a copy, as some loss of image information occurs when converting to the narrower color space.

Due to the standardization of sRGB on the Internet, on computers, and on printers, many low- to medium-end consumer digital cameras and scannersImage scanner

|-||}In computing, a scanner is a device that analyzes an image or an object and converts it to a digital image....
 use sRGB as the defaultDefault (computer science)

A default, in computer science, refers to a setting or value automatically assigned to a computer program or device, outside...
 (or only available) working color space. Used in conjunction with an inkjet printerInkjet printer Overview

Inkjet printers are a type of computer printer that operates by propelling tiny droplets of liquid ink onto paper....
, an sRGB image produces what is often regarded as satisfactory for home use. However, consumer-level camera LCDs are typically uncalibrated, meaning that even though the image is being labelled as sRGB, one can't conclude that the image is color-accurate on the LCD.

The two dominant programming interfaces for 3D graphics, OpenGLOpenGL

OpenGL is a standard specification defining a cross-language cross-platform API for writing applications that produce 3D co...
 and Direct3DDirect3D

Direct3D is part of Microsoft's DirectX API....
, have both incorporated sRGB. OpenGL 2.1 incorporates sRGB textures first introduced by the OpenGL's supports rendering into framebuffers assuming either a linear or sRGB color space. DirectXDirectX

DirectX is a collection of APIs for handling tasks related to multimedia, especially game programming, on Microsoft platform...
 9 supports sRGB textures and rendering into sRGB surfaces using Direct3D.

Standards

  • IEC 61966-2-1:1999 is the official specification of sRGB. It provides viewing environment, encoding, and colorimetric details.
  • Amendment A1:2003 to IEC 61966-2-1:1999 describes an analogous sYCC encoding for YCbCrYCbCr

    YCbCr is a family of color spaces used in video systems....
     color spaces, an extended-gamutGamut

    In computer graphics, the gamut, or color gamut, is a certain complete subset of colors....
     RGB encoding, and a CIELAB transformation.
  • The of IEC 61966-2-1 is available online, but is not the complete standard.

External links

  • , now unavailable, containing much information on the design, principles and use of sRGB