Hex Codes vs. Color Names: Which is Better?
Hex codes are a bit harder to understand than color names, particularly if you’re not used to hexadecimal notation. However, it’s probably better to use hex codes anyway. First, hex codes provide much more flexibility — you can specify about 16 million different combinations with hex codes. (Many people have computers that can’t display that many colors, but that’s another matter.) There aren’t anywhere near that number of color names. Second, hex codes are more stable and universal. Simple color names such as “red” and “black” will work in just about any browser, but support for fancy color names (such as “papayawhip”) is a bit dodgier. It’s best to stick with hex codes, which are understood universally.