Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
RGBA color model
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== ARGB32 === The channels are arranged in memory in such manner that a single 32-bit unsigned integer has the alpha sample in the highest 8 bits, followed by the red sample, green sample and finally the blue sample in the lowest 8 bits: [[File:PixelSamples32bppRGBA.png|none|Sample layout in a typical 32bpp pixel]] ARGB values are typically expressed using 8 [[hexadecimal]] digits, with each pair of the hexadecimal digits representing the values of the Alpha, Red, Green and Blue channel, respectively. For example, <code>80FFFF00</code> represents 50.2% opaque (non-premultiplied) yellow. The <code>80</code> hex value, which is 128 in decimal, represents a 50.2% alpha value because 128 is approximately 50.2% of the maximum value of 255 (FF hex); to continue to decipher the <code>80FFFF00</code> value, the first <code>FF</code> represents the maximum value red can have; the second <code>FF</code> is like the previous but for green; the final <code>00</code> represents the minimum value blue can have (effectively β no blue). Consequently, red + green yields yellow. In cases where the alpha is not used this can be shortened to 6 digits <code>RRGGBB</code>, this is why it was chosen to put the alpha in the top bits. Depending on the context a <code>0x</code> or a number sign (#)<ref>[http://msdn.microsoft.com/en-us/library/system.windows.media.color(v=vs.95).aspx Microsoft MSDN XAML Color Structure reference] (XAML/WPF/Silverlight), including <code>#aarrggbb</code> and <code>sc# scA,scR,scG,scB</code></ref> is put before the hex digits. This layout became popular when 24-bit color (and 32-bit RGBA) was introduced on personal computers. At the time it was much faster and easier for programs to manipulate one 32-bit unit than four 8-bit units. On little-endian systems, this is equivalent to BGRA byte order. On big-endian systems, this is equivalent to ARGB byte order.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)