Share to: share facebook share twitter share wa share telegram print page

RGBA color model

Example of an RGBA image composited over a checkerboard background. alpha is 0% at the top and 100% at the bottom.

RGBA stands for red green blue alpha. While it is sometimes described as a color space, it is actually a three-channel RGB color model supplemented with a fourth alpha channel. Alpha indicates how opaque each pixel is and allows an image to be combined over others using alpha compositing, with transparent areas and anti-aliasing of the edges of opaque regions.

The term does not define what RGB color space is being used. It also does not state whether or not the colors are premultiplied by the alpha value, and if they are it does not state what color space that premultiplication was done in. This means more information than just "RGBA" is needed to determine how to handle an image.

In some contexts the abbreviation "RGBA" means a specific memory layout (called RGBA8888 below), with other terms such as "BGRA" used for alternatives. In other contexts "RGBA" means any layout.

Representation

In computer graphics, pixels encoding the RGBA color space information must be stored in computer memory (or in files on disk). In most cases four equal-sized pieces of adjacent memory are used, one for each channel, and a 0 in a channel indicates black color or transparent alpha, while all-1 bits indicates white or fully opaque alpha. By far the most common format is to store 8 bits (one byte) for each channel, which is 32 bits for each pixel.

The order of these four bytes in memory can differ, which can lead to confusion when image data is exchanged. These encodings are often denoted by the four letters in some order (e.g. RGBA, ARGB, etc.). The interpretation of these 4-letter mnemonics is not well established. There are two typical ways to understand a mnemonic such as "RGBA":

  • In the byte-order scheme, "RGBA" is understood to mean a byte R, followed by a byte G, followed by a byte B, and followed by a byte A. This scheme is commonly used for describing file formats or network protocols, which are both byte-oriented.
  • In the word-order scheme, "RGBA" is understood to represent a complete 32-bit word, where R is more significant than G, which is more significant than B, which is more significant than A.

In a big-endian system, the two schemes are equivalent. This is not the case for a little-endian system, where the two mnemonics are reverses of each other. Therefore, to be unambiguous, it is important to state which ordering is used when referring to the encoding. This article will use a scheme that has some popularity, which is to add the suffix "8888" to indicate if 4 8-bit units or "32" if one 32-bit unit are being discussed.

RGBA representation converter
Little-endian Big-endian
RGBA8888 ABGR32 RGBA32
ARGB32 BGRA8888 ARGB8888
RGBA32 ABGR8888 RGBA8888

RGBA8888

In OpenGL and Portable Network Graphics (PNG), the RGBA byte order is used, where the colors are stored in memory such that R is at the lowest address, G after it, B after that, and A last. On a little endian architecture this is equivalent to ABGR32.[1]

In many systems when there are more than 8 bits per channel (such as 16 bits or floating-point), the channels are stored in RGBA order, even if 8-bit channels are stored in some other order.

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:

Sample layout in a typical 32bpp pixel
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, 80FFFF00 represents 50.2% opaque (non-premultiplied) yellow. The 80 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 80FFFF00 value, the first FF represents the maximum value red can have; the second FF is like the previous but for green; the final 00 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 RRGGBB, this is why it was chosen to put the alpha in the top bits. Depending on the context a 0x or a number sign (#)[2] 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.

RGBA32

In some software originating on big-endian machines such as Silicon Graphics, colors were stored in 32 bits similar to ARGB32, but with the alpha in the bottom 8 bits rather than the top. For example, 808000FF would be Red and Green:50.2%, Blue:0% and Alpha:100%, a brown. This is what you would get if RGBA8888 data was read as words on these machines. It is used in Portable Arbitrary Map and in FLTK, but in general it is rare.

RGBA pixel layout

The bytes are stored in memory on a little-endian machine in the order ABGR.

See also

References

  1. ^ "Portable Network Graphics (PNG) Specification (Second Edition)". www.w3.org. Retrieved 25 November 2021.
  2. ^ Microsoft MSDN XAML Color Structure reference (XAML/WPF/Silverlight), including #aarrggbb and sc# scA,scR,scG,scB

External links

Read more information:

Lukas Nmecha Nmecha bersama Manchester City pada 2017Informasi pribadiNama lengkap Lukas Okechukwu Nmecha[1]Tanggal lahir 14 Desember 1998 (umur 25)[2]Tempat lahir Hamburg, JermanTinggi 185 cm (6 ft 1 in)[3]Posisi bermain Penyerang, sayapInformasi klubKlub saat ini VfL WolfsburgNomor 10Karier junior2007–2018 Manchester CityKarier senior*Tahun Tim Tampil (Gol)2017–2021 Manchester City 2 (0)2018–2019 → Preston North End (pinjaman) 41 (3)2019–20…

Janet GuthrieJanet Guthrie di tahun 2011.Lahir7 Maret 1938 (umur 86)Iowa City, IowaKebangsaanAmerika SerikatAlmamaterUniversitas MichiganPekerjaanPembalap mobil, insinyurTahun aktif1963–1980 (sebagai pembalap)Suami/istriWarren Levine ​ ​(m. 1989; meninggal 2006)​Karier NASCAR Seri Piala33 lomba dalam kurun waktu 4 tahunHasil terbaikPosisi 6 (1977)Lomba pertamaWorld 600 1976 (Charlotte)Lomba terakhirCoca-Cola 500 1980 (Pocono) Menang Top…

Artikel ini perlu dikembangkan agar dapat memenuhi kriteria sebagai entri Wikipedia.Bantulah untuk mengembangkan artikel ini. Jika tidak dikembangkan, artikel ini akan dihapus. Invasi Mongolia ke JepangBagian dari Invasi Mongolia ke Asia TimurTanggal1274, 1281LokasiKyūshū Utara, JepangHasil Kemenangan JepangPihak terlibat Kekaisaran Mongol Dinasti Yuan Goryeo Jepang Keshogunan Kamakura Klan Hōjō Klan Sō Klan Shōni Klan Sashi Klan Taira Klan Kikuchi Klan Ōtomo Klan Shimazu Klan MatsuraToko…

Nazi paramilitary death squads, part of the SS For other uses, see Organisation Todt § Administrative units. EinsatzgruppenThe Einsatzgruppen operated under the administration of the Schutzstaffel (SS)Mass execution of Soviet civilians, 1941Agency overviewFormedc. 1939Preceding agencyEinsatzkommandoJurisdictionGermany and German-occupied EuropeHeadquartersRSHA, Prinz-Albrecht-Straße, Berlin52°30′26″N 13°22′57″E / 52.50722°N 13.38250°E / 52.50722; 13.38…

الدوري الإنجليزي الممتاز للسيدات 2011 تفاصيل الموسم الدوري الإنجليزي الممتاز للسيدات  النسخة 1  البلد المملكة المتحدة  التاريخ بداية:13 أبريل 2011  نهاية:28 أغسطس 2011  المنظم الاتحاد الإنجليزي لكرة القدم  البطل نادي آرسنال للنساء  مباريات ملعوبة 56   عدد المشارك…

Earthquake in Japan on January 17, 1995 This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Great Hanshin earthquake – news · newspapers · books · scholar · JSTOR (February 2015) (Learn how and when to remove this template message) Great Hanshin earthquake兵庫県南部地震阪神・淡路大震災The damaged Kob…

Madam C. J. WalkerWalker, c. early 1900sLahirSarah BreedloveDecember 23, 1867Delta, Louisiana, U.S.Meninggal25 Mei, 1919 (usia 51)Irvington-on-Hudson, New YorkKebangsaanAmericanAnakA'Lelia Walker Sarah Breedlove (23 Desember 1867 - 25 Mei 1919), yang dikenal sebagai Madam CJ Walker, adalah seorang pengusaha Amerika, filantropis, dan wanita pertama jutawan buatan sendiri di Amerika Dia membuat hartanya dengan mengembangkan dan memasarkan garis. produk kecantikan dan rambut untuk perempuan kulit h…

For the current princess, see Princess Louise of Belgium (b. 2004). Princess Philipp of Saxe-Coburg and Gotha Louise of BelgiumPrincess Philipp of Saxe-Coburg and GothaPrincess Louise, ca. 1894Born(1858-02-18)18 February 1858Royal Palace, Brussels, BelgiumDied1 March 1924(1924-03-01) (aged 66)Hotel Nassauer Hof, Wiesbaden, GermanyBurialSouth Cemetery WiesbadenSpouse Prince Philipp of Saxe-Coburg and Gotha ​ ​(m. 1875; div. 1906)​Issue Prince L…

Canadian ice hockey player and coach Ice hockey player Jarrod Skalde Skalde with the Springfield Falcons in 2004Born (1971-02-26) February 26, 1971 (age 53)Niagara Falls, Ontario, CanadaHeight 6 ft 0 in (183 cm)Weight 180 lb (82 kg; 12 st 12 lb)Position CentreShot LeftPlayed for New Jersey DevilsMighty Ducks of AnaheimCalgary FlamesSan Jose SharksDallas StarsChicago BlackhawksAtlanta ThrashersPhiladelphia FlyersLausanne HCLeksands IFOji EaglesHK JeseniceVl…

WrestleMania XXVI Poster menampilkan (dari kiri ke kanan) Shawn Michaels, Triple H, John Cena, The Undertaker dan Batista Tema Destruction in the Desert Get All Fired Up. Lagu Tema I Made It (Cash Money Heroes) oleh Kevin Rudolf feat. Birdman, Jay Sean dan Lil Wayne Thunderstruck oleh AC/DC Be Yourself oleh Audioslave The Show oleh Since October Detail Promosi WWE Tanggal 28 Maret, 2010 Tempat Stadion Universitas Phoenix Kota Glendale, Arizona Kehadiran 72,219 Kronologi Bayar-Per-Tayang Eliminat…

Bay in Svalbard, Norway Virgohamna (English: Virgo Bay) is a small bay on the northern coast of Danes Island, an island off the northwestern coast of Spitsbergen. Spitsbergen and Danes Island are islands of the Svalbard archipelago. The bay is named after SS Virgo, the vessel of Swedish engineer and explorer Salomon August Andrée's 1896 expedition. Virgohamna is located across a small strait from Smeerenburg, a historical whaling station on Amsterdam Island about 2 km to the north. History…

Cet article est une ébauche concernant une localité italienne et le Trentin-Haut-Adige. Vous pouvez partager vos connaissances en l’améliorant (comment ?) selon les recommandations des projets correspondants. Aldeno Noms Nom allemand Aldein Administration Pays Italie Région Trentin-Haut-Adige  Province Trentin   Code postal 38060 Code ISTAT 022003 Code cadastral A178 Préfixe tel. 0461 Démographie Gentilé aldeneri Population 3 228 hab. (1er janvier 2023[1]) Densi…

Louis II dari PrancisRaja Francia BaratBerkuasa877–879Prancis8 Desember 877 di CompiègnePendahuluKarl IIPenerusLouis III dan Karlmann IIPemakamanBiara Compiègne, Saint-Corneille, Prancis,WangsaKarolingAyahKarl yang BotakIbuErmentrude dari OrléansPasanganAnsgarde dari BurgundiaAdelaide dari ParisAnakLouis III dari PrancisKarlmann II Hildegarde dari PrancisGisela dari Prancis Ermentrude dari PrancisCharles yang Sederhana Louis yang Gagap (Prancis: Louis le Bègue; 1 November 846 R…

Chemical compound JWH-210Legal statusLegal status BR: Class F2 (Prohibited psychotropics)[1] CA: Schedule II DE: Anlage II (Authorized trade only, not prescriptible) UK: Class B US: Schedule I Illegal in Sweden, I-N (Poland)[2] Identifiers IUPAC name 4-Ethylnaphthalen-1-yl-(1-pentylindol-3-yl)methanone CAS Number824959-81-1 Y (JWH-210) 824960-02-3 (JWH-182)PubChem CID45270396ChemSpider24617616 NUNIIR18JYO04PYCompTox Dashboard (EPA)DTXSID30101001…

Occitan dialect spoken in France and Spain This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages) This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Gascon dialect – news · newspapers · books · scholar · JSTOR (April…

Theater and convention hall in Oklahoma, U.S. Tulsa TheaterExterior view of the west end of the theaterFormer namesBrady Theater (1979-2019) Tulsa Municipal Theater (1952-79) Tulsa Convention Hall (1914-52)Address105 Reconciliation WayTulsa, OK 74103-7809LocationTulsa Arts DistrictOwnerPeter MayoCapacity2,800ConstructionOpenedOctober 22, 1914[2]Construction cost$125,000($3.95 million in 2023 dollars[1])ArchitectRose and PetersonWebsiteVenue Website Convention HallU.S. Nation…

Сибирский горный козёл Научная классификация Домен:ЭукариотыЦарство:ЖивотныеПодцарство:ЭуметазоиБез ранга:Двусторонне-симметричныеБез ранга:ВторичноротыеТип:ХордовыеПодтип:ПозвоночныеИнфратип:ЧелюстноротыеНадкласс:ЧетвероногиеКлада:АмниотыКлада:СинапсидыКласс:…

Quadrilateral whose vertices can all fall on a single circle Examples of cyclic quadrilaterals In Euclidean geometry, a cyclic quadrilateral or inscribed quadrilateral is a quadrilateral whose vertices all lie on a single circle. This circle is called the circumcircle or circumscribed circle, and the vertices are said to be concyclic. The center of the circle and its radius are called the circumcenter and the circumradius respectively. Other names for these quadrilaterals are concyclic quadrilat…

Sel vero berusia seminggu Sel Vero merupakan jalur sel (continuous cell line) yang berasal dari ginjal monyet hijau afrika (African green monkey). Monyet ini merupakan salah satu jenis mamalia yang biasanya digunakan dalam penelitian biologi molekuler dan mikrobiologi. Salah satu penggunaan sel vero adalah dalam pembuatan vaksin.[1] Sel Vero merupakan sel monolayer dan termasuk jenis epithelial-like.[1] Sel ini menempel dengan kuat pada lapisan substrat yang berbahan polistiren d…

AFC AldermastonNama lengkapAssociation Football Club AldermastonJulukanThe Atom MenBerdiri1952StadionWaterside Park, ThatchamKetuaMartin DesayManajerDave TuttleSitus webSitus web resmi klub Kostum kandang Kostum tandang A.F.C. Aldermaston adalah klub sepak bola yang berbasis di Aldermaston, Berkshire, Inggris. Berafiliasi dengan Berks & Bucks Football Association,[1] klub saat ini menjadi anggota dan bermain di Waterside Park di Thatcham. Referensi ^ Berks & Bucks Charter St…

Kembali kehalaman sebelumnya