In HTML the colors are represented by a hexadecimal number formed by six hexadecimal digits (three pairs), preceded by a pad, such as #FFFFFF. Each hexadecimal digit can take up to sixteen different values, being the set of symbols used 0-9 and A-F.
Each of the three hexadecimal pairs corresponding to the three primary colors RGB (red, green and blue) can take 256 values, ranging from 0 to 255 decimal (00 to FF hexadecimal). Thus, there are 16,777,216 different combinations: 256 x 256 x 256 = 16,777,216