RGBA color space
Encyclopedia
RGBA stands for Red Green Blue Alpha. While it is sometimes described as a color space, it is actually simply a use of the RGB color model, with extra information. The color is RGB, and may belong to any RGB color space, but an integral alpha value as invented by Catmull
Edwin Catmull
Dr. Edwin Earl Catmull, Ph.D. is a computer scientist and current president of Walt Disney Animation Studios and Pixar Animation Studios. As a computer scientist, Catmull has contributed to many important developments in computer graphics....

 and Smith
Alvy Ray Smith
Alvy Ray Smith III is an American engineer and noted pioneer in computer graphics. He is a co-founder of the animation studio Pixar.- Life and career :...

 between 1971 and 1972 enables alpha blending and alpha compositing
Alpha compositing
In computer graphics, alpha compositing is the process of combining an image with a background to create the appearance of partial or full transparency. It is often useful to render image elements in separate passes, and then combine the resulting multiple 2D images into a single, final image in a...

. The inventors named alpha after the Greek letter in the classic linear interpolation
Linear interpolation
Linear interpolation is a method of curve fitting using linear polynomials. Lerp is an abbreviation for linear interpolation, which can also be used as a verb .-Linear interpolation between two known points:...

 formula αA + (1-α)B.

The alpha channel is normally used as an opacity channel. If a pixel has a value of 0% in its alpha channel, it is fully transparent
Transparency (graphic)
Transparency is possible in a number of graphics file formats. The term transparency is used in various ways by different people, but at its simplest there is "full transparency" i.e. something that is completely invisible. Of course, only part of a graphic should be fully transparent, or there...

 (and, thus, invisible), whereas a value of 100% in the alpha channel gives a fully opaque pixel (traditional digital images). Values between 0% and 100% make it possible for pixels to show through a background like a glass (translucency), an effect not possible with simple binary (transparent or opaque) transparency. It allows easy image compositing
Digital compositing
Digital compositing is the process of digitally assembling multiple images to make a final image, typically for print, motion pictures or screen display...

. Alpha channel values can be expressed as a percentage, integer, or real number between 0 and 1 like RGB parameters.

PNG is an image format that uses RGBA.
The terms ARGB, ARGB32, or ARGB8888 are often used, for example, in Macromedia
Macromedia
Macromedia was an American graphics and web development software company headquartered in San Francisco, California that produced such products as Flash and Dreamweaver. Its rival, Adobe Systems, acquired Macromedia on December 3, 2005 and controls the line of Macromedia...

 products terminology or the Silverlight framework.
The term BGRA may also be seen. This represents the order that the bytes for each channel are actually in memory when ARGB32 data is stored by a little-endian CPU (such as Intel processors).

RGBA pixel formats

In computer graphics, pixels encoding the RGBA Color Space information must be stored in computer memory (or in files on disk), in well defined formats.

In most 32-bit per pixel formats (32bpp), the intensity of each channel sample
Sample (graphics)
In computer graphics, a sample is an intersection of channel and a pixel.The diagram below depicts a 24-bit pixel, consisting of 3 samples for Red, Green, and Blue....

 is defined by 8 bits, and the samples
Sample (graphics)
In computer graphics, a sample is an intersection of channel and a pixel.The diagram below depicts a 24-bit pixel, consisting of 3 samples for Red, Green, and Blue....

 are arranged in memory in such manner that a single 32-bit DWORD has the Alpha sample
Sample (graphics)
In computer graphics, a sample is an intersection of channel and a pixel.The diagram below depicts a 24-bit pixel, consisting of 3 samples for Red, Green, and Blue....

 in the highest 8 bits, followed by the Red sample
Sample (graphics)
In computer graphics, a sample is an intersection of channel and a pixel.The diagram below depicts a 24-bit pixel, consisting of 3 samples for Red, Green, and Blue....

, Green sample
Sample (graphics)
In computer graphics, a sample is an intersection of channel and a pixel.The diagram below depicts a 24-bit pixel, consisting of 3 samples for Red, Green, and Blue....

 and the Blue sample
Sample (graphics)
In computer graphics, a sample is an intersection of channel and a pixel.The diagram below depicts a 24-bit pixel, consisting of 3 samples for Red, Green, and Blue....

 in the lowest 8 bits.
See the diagram below:
Fig.1 – An example of the most common 32bpp pixel layout

ARGB values are typically expressed using 8 hexadecimal
Hexadecimal
In mathematics and computer science, hexadecimal is a positional numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F to represent values ten to fifteen...

 digits, with each pair of the hexadecimal digits representing the sample
Sample (graphics)
In computer graphics, a sample is an intersection of channel and a pixel.The diagram below depicts a 24-bit pixel, consisting of 3 samples for Red, Green, and Blue....

 values of the Alpha, Red, Green and Blue channel, respectively.
For example, 0x80FFFF00 represents 50.2% opaque (non-premultiplied) yellow. The "0x" prefix is used to identify a number as hexadecimal in C notation.
0x80 represents a 50.2% alpha value, because it is 50.2% of 0xFF (in decimal 128 is 50.2% of 255), the first 0xFF represents the maximum value a red sample
Sample (graphics)
In computer graphics, a sample is an intersection of channel and a pixel.The diagram below depicts a 24-bit pixel, consisting of 3 samples for Red, Green, and Blue....

 can have; the second 0xFF is like the previous but for green; 0x00 represents the minimum value a blue sample
Sample (graphics)
In computer graphics, a sample is an intersection of channel and a pixel.The diagram below depicts a 24-bit pixel, consisting of 3 samples for Red, Green, and Blue....

 can have (effectively – no blue). Consequently red + green yields yellow.

See also

  • Alpha compositing
    Alpha compositing
    In computer graphics, alpha compositing is the process of combining an image with a background to create the appearance of partial or full transparency. It is often useful to render image elements in separate passes, and then combine the resulting multiple 2D images into a single, final image in a...

  • Digital compositing
    Digital compositing
    Digital compositing is the process of digitally assembling multiple images to make a final image, typically for print, motion pictures or screen display...

  • RGB (Red Green Blue, with no transparency effects)
  • scRGB color space
    ScRGB color space
    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 just less than +7.5.Negative numbers enables scRGB to...

    , a high definition color space
    Color space
    A color model is an abstract mathematical model describing the way colors can be represented as tuples of numbers, typically as three or four values or color components...

     with alpha channel

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK