HTML colors are specified using defined color name keywords or RGB, HEX, HSL, RGBA, HSLA values. Color Hue is another word for color.
For example the color green has the HEX color code #00FF00, that is also RGB(0,255,0), which is '0' red, '255' green, and '0' blue. The color codes can be used to change the color for the text and the background on a web page.
<!DOCTYPE html>
<html>
<body>
<h1 style="background-color:#4CC417;"><font color="#00bfff">Color Green Apple</font></h1>
<h1 style="background-color:#F87217;"><font color="#4B0082">Color Pumpkin Orange</font></h1>
<h1 style="background-color:#81D8D0;"><font color="#FFFFFF">Color Tiffany Blue</font></h1>
<h1 style="background-color:#6CC417;">Color Alien Green</h1>
<h1 style="background-color:#504A4B;"><font color="#81D8D0">Color Gray Wolf</font></h1>
<h1 style="background-color:#F6358A;"><font color="#FFFFFF">Color Violet Red</font></h1>
<h1 style="background-color:#B6B6B4;">Color Gray Cloud</h1>
</body>
</html>
Hexadecimal Colors
Remember that hexadecimal color values are supported by all browsers.
Hexadecimal colors is specified with: #RRGGBB.
RR (red), GG (green) and BB (blue) are defined as hexadecimal integers between 00 and FF, it defines the intensity of the color.
#00FF00 displays green, the green component is set to the highest value (FF) and the others are set to 00.
RGB Colors
Remember that RGB color values are supported by all browsers.
RGB colors are specified with: rgb(red, green, blue).
The red, green and blue defines the intensity of the color, it is defined as an integer between 0 and 255.
rgb(0, 255, 0) displays green, the green component is set to its highest value (255) and the others are set to 0. Be sure to enclose the parameter in parentheses and prefix it with a lowercase 'rgb'.
HSL Colors
HSL color values are supported by all major browsers.
HSL stands for hue, saturation, and lightness.
HSL color values are specified with: hsl(hue, saturation, lightness).
Hue
Hue is defined as a degree in the color wheel from 0 to 360. 0 is red, 120 is green, 240 is blue.
Saturation
Saturation is a percentage value; 0% means a shade of gray and 100% is the full color.
Lightness
Lightness is a percentage; 0% is black, 100% is white.