Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What is the RGB format?

Shulou Source: shulou.com Published: 2022-06-01 21:06:47 10月03日 Update

This article introduces you how the RGB format is, the content is very detailed, interested friends can refer to, hope to be helpful to you.

I. Overview

Speaking of RGB, we must be no stranger, three primary colors, Red, Green, Blue, the range of each color value is 0 255, so each color with 1 byte = 8 bit can be completely expressed in the computer. And R, G, B different combinations produce almost all colors, of course, the colors in nature are much richer than these, using R, G, B way, if expressed in 24 color depth, the number of colors that can be expressed in the computer is 2 ^ 8 * 2 ^ 8 * 2 ^ 8 = 16777216, which is not as rich as nature, but it is enough to show the world, , you think.

Second, the format of RGB:

To put it simply, the representation of RGB in a computer is mainly divided into two categories, one is index form, the other is pixel form:

(1) Index:

Such as RGB1, RGB4,RGB8, each pixel is represented by 1 bit, 4 bit, and 8 bit, respectively, so these bit store not the actual RMagi G, B values, but the index of the pixels of the corresponding points in the color palette (which will be covered later).

(2) Pixel form:

These formats, such as RGB565,RGB555 and RGB24,RGB32,ARGB32, store the values of RMagne G and B for each pixel. RGB24, for example, uses eight bit to represent R, G, and B.

About how the RGB format is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Color pixel format form index computer content more natural natural storage help different good strange tricolor world interest category byte Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Shulou Technology vpn Docker Linux