HTML CSS examples for CSS:Color
The RGB value in functional notation is specified with: rgb(red, green, blue).
(red, green, blue) defines the color and can be an integer value (from 0 to 255) or a percentage value (from 0% to 100%).
The integer value 255 corresponds to 100%, and also can be converted to f or ff in the hexadecimal notation:
For example, rgb(0,255,255) = rgb(0%,100%,100%) = #0ff, and all values represents the same color which is aqua.
<!DOCTYPE html> <html> <head> <title>CSS Functional Notation</title> <style type="text/css"> h1 {<!-- w w w .j a va 2s. co m--> color: rgb(0,255,255); } p { background-color: rgb(0%,100%,100%); } </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html>