RGB colors are called additive color because you can produce white by adding R, G, and B together (that is, all light bounces back to the eye). The additive is used for lighting, television and computer monitors. For example, the display produces color by emitting light from a red, green, and blue phosphor.
Most of the visible spectra can be expressed as red, green, Blue (RGB) Three colors in different proportions and intensity of the mixture. If these colours overlap, they produce cyan, magenta, and yellow.
Additive fineness (RGB)
R. Red G. Green B. Blue
You can handle color values by using an RGB color pattern based on the RGB color model. In RGB mode, each RGB component can use a value from 0 (black) to 255 (white). For example, bright red uses R value 246, G value 20, and B value 50. When all three components are of equal value, a gray shadow is generated. When the value of all components is 255, the result is pure white; When the value is 0 o'clock, the result is solid black.
The method of encoding a color is collectively called "Color Space" or "gamut." In the simplest terms, the "color space" of any color in the world can be defined as a fixed number or variable. RGB (red, green, blue) is just one of many color spaces. With this coding method, each color can be represented by three variables-red green and the intensity of the blue. R GB is one of the most common scenarios for recording and displaying color images. However, it lacks good compatibility with early Black-and-white display systems. Therefore, a lot of electronics manufacturers commonly adopted the practice is to convert RGB to YUV color to maintain compatibility, and then change the RGB format as needed to display color graphics on the computer monitor.
Since Web pages (web) are based on the media developed by the Computer browser, the colors are RGB (red, green, blue) color. The page color is expressed in 16 code, the general format is #zyzabc (alphanumeric substitution) such as black is three color 0, in the Web page code is: #000000. When the color code is #xxyyzz, it can be expressed in #xyz, as #135 and #113355 represent the same color.
RGB ()
The function combines three integers representing red, green, and blue primaries into a long integer representing the color.
Syntax rgb (red, green, blue)
Parameter Red:integer type that specifies the red component strength in the color, valid values are between 0 and 255 Green:integer type, the green component strength in the specified color, the valid value is between 0 and 255 Blue:integer type, the blue component intensity in the specified color, Valid values return a Long value between 0 and 255. Returns the color determined by the specified component when the function executes successfully, represented by a long integer. Returns-1 if an error occurs. Returns null if the value of any parameter is the NULL,RGB () function.
Use the RGB () function to calculate a long integer representing a color using the following formula: 65536 * blue+ 256 * green+ red where Blue is the component Green is the color component, and red represents the color. In each component, the smaller the number, the lower the brightness, the greater the value, the higher the brightness. For example,,rgb ( 0, 0, 0 ) is black (lowest brightness),rgb ( 255, 255,255 ) is white (highest brightness).
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.