RGB (Red, Green, Blue) is an additive color model in which red, green, and blue light are added together in various ways to reproduce a broad array of colors.
- component has a range from 0 to 255
- RGB(255, 255, 255) is white
- RGB(0, 0, 0) is black
Hexadecimal color codes are a way to represent RGB colors using the base-16 number system. Each pair of digits represents one component (red, green, or blue).
- Format: #RRGGBB where RR is red, GG is green, and BB is blue
- Each component ranges from 00 to FF in hexadecimal (0-255 in decimal)
- For example, #FF0000 is pure red
- Shorthand notation: #RGB where each digit is duplicated (e.g., #F00 equals #FF0000)