RGB Plus Color Description _ Basic Tutorial

Source: Internet
Author: User
The RGB color is called additive color because you can produce white by adding R, G, and B together (that is, all light bounces back to the eye). Additive color is used to illuminate light, TV and computer monitors. For example, the monitor emits light from red, green, and blue phosphor to produce color.

The vast majority of visible spectra can be expressed as red, green, Blue (RGB) Three colors mixed in different proportions and intensities. These colors, if overlapping, produce cyan, magenta, and yellow.

Additive color (RGB)
R. Red G. Green B. Blue
You can work with color values by using the RGB color mode based on the RGB color model. In RGB mode, each RGB component can use values from 0 (black) to 255 (white). For example, bright red uses the R value 246, the G value 20, and the B value 50. When all three ingredient values are equal, a gray shadow is generated. When the value of all ingredients is 255, the result is pure white; When the value is 0 o'clock, the result is pure black.

The method of encoding a color is collectively referred to as "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. Using this encoding method, each color can be represented by three variables-red green and blue intensity. When recording and displaying color images, R GB is one of the most common scenarios. However, it lacks good compatibility with early black-and-white display systems. As a result, it is common practice for a multi-electronics manufacturer to convert RGB to YUV color to maintain compatibility, and then replace the RGB format as needed to display color graphics on the computer monitor.

Because Web pages (web) are media developed based on a computer browser, colors are dominated by optical rgb (red, green, blue). Web page color is expressed in 16 code, the general format is #zyzabc (the letter is replaced with a number) such as black is three color 0, in the page code is: #000000. When the color code is #xxyyzz, you can use #xyz to represent the same color as #135 and #113355.

RGB ()
The function combines three integers representing red, green, and blue primaries into a long integer representing the color.
Syntax rgb (red, green, blue)
The parameter Red:integer type, which specifies the red component strength in the color, the valid value between 0 and 255 Green:integer type, the green component strength in the specified color, the valid value between 0 and 255 Blue:integer type, the intensity of the blue component in the specified color, Valid values return a value of long from 0 to 255. When the function executes successfully, returns the color determined by the specified component, represented by a long integer. Returns-1 if an error occurs. If the value of any parameter is Null,rgb () the function returns NULL.
Use the RGB () function to calculate a long integer representing the color using the following formula: 65536 * blue+ * green+ red where blue is the color, green is the component, and red is the colour. In each component, the smaller the value, 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).
  • Related Article

    Contact Us

    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.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.