HTML RGB Colors

RGB sets a color from red, green, and blue channels.

An RGB color is written rgb(red, green, blue), where each channel is a number from 0 to 255. Mixing the three produces any on-screen color.

An RGB color

<!DOCTYPE html>
<html>
<body>

<h1 style="color:rgb(255, 99, 71);">RGB color</h1>

</body>
</html>

Shades of Gray

When red, green, and blue are equal you get a shade of gray, from black at 0 to white at 255.

Gray

<!DOCTYPE html>
<html>
<body>

<p style="color:rgb(120, 120, 120);">A gray paragraph</p>

</body>
</html>
Note: Add a fourth value with rgba() for transparency, from 0 (clear) to 1 (solid).