The difference and introduction of ARGB, RGB and RGBA

The difference and introduction of ARGB, RGB and RGBA

ARGB is a color mode, which is the RGB color mode with an Alpha (transparency) channel added, commonly found in the storage structure of 32-bit bitmaps.

The RGB color model is a color standard in the industry. It obtains a variety of colors by changing the three color channels of red (R), green (G), and blue (B) and superimposing them on each other. RGB represents the colors of the three channels of red, green, and blue. This standard covers almost all colors that can be perceived by human vision and is one of the most widely used color systems at present.

RGBA is a color space that represents Red, Green, Blue and Alpha. Although it is sometimes described as a color space, it is really just the RGB model with additional information. The colors used are RGB and can belong to any RGB color space, but Catmull and Smith proposed this indispensable alpha value between 1971 and 1972, making alpha rendering and alpha compositing possible. The proposer named it alpha because the classic linear interpolation equation αA + (1-α)B uses this Greek letter. PNG is an image format that uses RGBA.

The difference between 6-bit and 8-bit values ​​when defining color in Android: 6-bit (#000000) is RGB value 8-bit (#1e000000) ARGB The first two bits are transparency, 00 is completely transparent, ff is completely opaque, and the last 6 bits are RGB values, which are relatively moderate transparency values

What does the a in RGBA mean? How to use RGBA

RGBA Color

RGB is a color standard that produces a variety of colors by varying and superimposing red (R), green (G), and blue (B). To put it simply, RGBA adds a transparency channel Alpha to RGB.
grammar:
rgba (R, G, B, A)
illustrate:
R: red value (Red);
G: Green value (Green);
B: blue value (Blue);
A: Transparency (Alpha);
The three parameters R, G, and B can be positive integers or percentages. The positive integer value ranges from 0 to 255, and the percentage value ranges from 0.0% to 100.0%. Values ​​outside the range will be rounded to the nearest value limit. Not all browsers support the use of percentage values.
Parameter A is transparency, similar to the opacity attribute. Its value range is between 0.0 and 1.0 and cannot be negative. The following is the correct usage of RGBA colors:

rgba(255,255,0,0.5)
rgba(50%,80%,50%,0.5)

Example:

<!DOCTYPEhtml>
<htmlxmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS3RGBA Color</title>
<styletype="text/css">
*{padding:0;margin:0;}
ul
{
display:inline-block;
list-style-type:none;
width:200px;
}
li
{
height:30px;
line-height:30px;
font-size:20px;
font-weight:bold;
text-align:center;
}
/*The first li*/
li:first-child
{
background-color:#FF00FF;
}
/*The second li*/
li:nth-child(2)
{
background-color:rgba(255,0,255,0.5);
}
/*The third li*/
li:last-child
{
background-color:#FF00FF;
opacity:0.5;
}
</style>
</head>
<body>
<ul>
<li>123WORDPRESS.COM</li>
<li>123WORDPRESS.COM</li>
<li>123WORDPRESS.COM</li>
</ul>
</body>
</html>

This is the end of this article about the differences and introductions of ARGB, RGB and RGBA. For more information about the differences between ARGB, RGB and RGBA, please search previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future!

<<: 

>>:  Detailed explanation of HTML tables

Recommend

CentOS 7.2 builds nginx web server to deploy uniapp project

Panther started as a rookie, and I am still a roo...

How to draw the timeline with vue+canvas

This article example shares the specific code of ...

How to write HTML head in mobile device web development

Copy code The code is as follows: <head> &l...

Vue implements simple notepad function

This article example shares the specific code of ...

Detailed explanation of MySQL data rows and row overflow mechanism

1. What are the formats of lines? You can see you...

How to install and deploy gitlab server on centos7

I am using centos 7 64bit system here. I have tri...

JavaScript implements the protocol example in which the user must check the box

In js, set the user to read a certain agreement b...

Vue shuttle box realizes up and down movement

This article example shares the specific code for...

Practical example of Vue virtual list

Table of contents Preface design accomplish summa...

How to implement distributed transactions in MySQL XA

Table of contents Preface XA Protocol How to impl...

Vue batch update dom implementation steps

Table of contents Scene Introduction Deep respons...

Two ways to specify the character set of the html page

1. Two ways to specify the character set of the h...

Use Docker to create a distributed lnmp image

Table of contents 1. Docker distributed lnmp imag...

Specific use of MySQL window functions

Table of contents 1. What is a window function? 1...