Hexadecimal Colors
Hexadecimal (hex) color codes are the most widely used color format in web design. They start with a # followed by six hexadecimal digits representing the red, green, and blue channels: #RRGGBB. Each channel ranges from 00 (none) to FF (full intensity).
Shorthand Hex and Hex with Alpha
When both digits of each channel are identical you can use the 3-digit shorthand: #RGB. For example, #ff6600 shortens to #f60. CSS also supports an 8-digit hex format (#RRGGBBAA) and a 4-digit shorthand (#RGBA) for transparency, where AA is the alpha channel (00 = fully transparent, FF = fully opaque).
#FF0000— Pure red#00FF00— Pure green#0000FF— Pure blue#FFFFFF— White#000000— Black#FF000080— Semi-transparent red