It's pretty easy to understand the word color codes, but those hex codes are rather strange. Here's a quick explanation.
The three primary colors are red, blue, and yellow. Remember that from high school art? They're called the primary colors because there are no two "lesser" colors that make them up. Purple is not a primary color because it can be created through combining equal parts of blue and red. In the world of mechanical things that make color, like a television, or a computer screen, color is created through the mixing of three basic colors to make other colors. It's a process known as "additive color