What is RGB color model?
- The Red, Green and Blue can be combined in various portions to obtain different color.
- The levels of R, G, B can each range from 0 to 100 percent full intensity.
- Each level is represented by the range of decimal numbers from 0 to 255 (256 levels for each color).
RGB devices:
- Image Scanners and Digital Camers.
- Tv sets, computer and mobile phone displays, video projectors, multicolor LED displays etc...
Colors in Web Design:
- The RGB color model is used when designing websites because the final product is viewed on a computer display.
- In creating web pages, to ensure the consistency on both PC and Mac browsers 216 combinations common to both is recommended.
- A pair of characters in the hex code represents the intensity of R, G, B respectively.
- Below are some examples of basic colors used in web design.
#XXYYZZ
Color | HTML / CSS Name | Hex Code #RRGGBB |
Decimal Code (R,G,B) |
---|---|---|---|
Black | #000000 | (0,0,0) | |
White | #FFFFFF | (255,255,255) | |
Red | #FF0000 | (255,0,0) | |
Lime | #00FF00 | (0,255,0) | |
Blue | #0000FF | (0,0,255) | |
Yellow | #FFFF00 | (255,255,0) | |
Cyan / Aqua | #00FFFF | (0,255,255) | |
Magenta / Fuchsia | #FF00FF | (255,0,255) | |
Silver | #C0C0C0 | (192,192,192) | |
Gray | #808080 | (128,128,128) | |
Maroon | #800000 | (128,0,0) | |
Olive | #808000 | (128,128,0) | |
Green | #008000 | (0,128,0) | |
Purple | #800080 | (128,0,128) | |
Teal | #008080 | (0,128,128) | |
Navy | #000080 | (0,0,128) |
- By using equal values for R, G and B we will get different shades of gray.
rgb(0, 0, 0)
rgb(120, 120, 120)
rgb(180, 180, 180)
rgb(192,192,192)
rgb(240, 240, 240)
rgb(255, 255, 255)
- Different combinations of R, G, B to get wide range of colors.