Hex

Hex is just like RGB, but the values of red, green and blue are represented by hexadecimals(00-FF) instead of 0-255. It is defined by #rrggbb
Where rr is the red value, gg is the green value, and bb is the blue value.
FF is the brightest color and 00 is the darkest color.

In place of 6 digits in hexadecimal, we can also use 3 digits ( #rgb ), 1 for each color value. This is called shorthand notation.
It is translated to 6 digit form by computer automatically.
For example #f00 is translated to #ff0000.

We can add one more channel to the Hex.
i.e. the alpha channel.
and the color model is defined by #rrggbbaa.
Where alpha is also a hexadecimal number between ( 0 - F ) which is the information about transparency of the color.
F is opaque and 0 is completely transparent. By default alpha is F.

Note: #rrggbb is the same as #rrggbbff

Syntax

                
    #rrggbb                    // for example : #FF0000 (red)
    #rgb                       // for example : #FF0 (yellow)
    #rrggbbaa                  // for example : #695FE6FF (ChelseaJS Official color)
    #rgba                      // for example : #F37A (pinkish color with transparency)
            

Example