Different ways to declare color
Hex color and shorthand
Color values in hex are always written with the hash or pound sign "#" first. There should be no space, as well. Below are a few color examples in hex.
#000000 | |
#ffffff | |
#ff0000 | |
#00ff00 |
As we mentioned, you don't need to memorize all the number combinations. Most code editor will give your the color picker. Also, you can get the hex value from your photoshop, illustrator etc. etc.
When the hex value for the particular color is the same number or letter, you can write it with short hand. Instead of six number/letters after the "#" you can use just three. For example the same color as shown above:
#000 | |
#fff | |
#ff00 | |
#0ff0 |