HTML and CSS Reference
In-Depth Information
Figure 3.3 The color picker tool within Adobe Photoshop displays the hexadecimal,
RGB, and HSL color values
RGB & RGBa Colors
RGB color values are stated using the rgb() function, which stands for red, green, and
blue. The function accepts three comma-separated values, each of which is an integer from
0 to 255 . A value of 0 would be pure black; a value of 255 would be pure white.
As we might expect, the first value within the rgb() function represents the red channel,
the second value represents the green channel, and the third value represents the blue chan-
nel.
If we were to recreate the shade of orange from before as an RGB color value, it would be
represented as rgb(255, 102, 0) .
Also, using the same maroon and yellow background colors from before, we could replace
the keyword or hexadecimal color values with RGB color values.
Click here to view code image
1. .task {
2. background: rgb(128, 0, 0) ;
Search WWH ::




Custom Search