Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <head> <style> #p1 {background-color:rgb(255,0,0);} #p2 {background-color:rgb(0,255,0);} #p3 {background-color:rgb(0,0,255);} #p4 {background-color:rgb(192,192,192);} #p5 {background-color:rgb(255,255,0);} #p6 {background-color:rgb(255,0,255);} </style> </head> <body> <h2>RGB colors</h2> <p>An RGB color value is specified with the rgb() function: rgb(red, green, blue)</p> <p>Each parameter (red, green, and blue) defines the intensity of the color and can be an integer between 0 and 255 or a percentage value (from 0% to 100%).</p> <p id="p1">Red</p> <p id="p2">Green</p> <p id="p3">Blue</p> <p id="p4">Grey</p> <p id="p5">Yellow</p> <p id="p6">Cerise</p> </body> </html>