There's an additional way to specify colors in CSS: hexadecimal color codes, often referred to as "hex color codes" for short.
Hex color codes also offer 16,777,216 color options, but they follow a different syntax.
When specifying an RGB color mixture, the values are in base 10. Hex color codes, however, use base 16, or hexadecimal base (hence the name), to specify color mixtures.
When read from left to right, each group of two characters responds to a value for red, green and blue, respectively. In the example above,
09 refers to the value for red,
AA refers to the value for blue, and
34 refers to the value for green. All hex color codes begin with a
Is there a difference between RGB values and hex color codes?
Not really. RGB values and hex color codes are different ways to represent the same thing: color. It's possible to convert back and forth between RGB values and hex color codes (color pickers often help with this conversion).
Note: When a hex color code is composed of entirely of the same characters, the hex color can be abbreviated, like so: