The common way to declare a hex color is using 6 digits. When using the 3 digits format, you are shortening the 6 digits format. This only works if the digits in the positions R (so 1,2), G (3,4) and B(5,6) are equals.
Eg: You can write #00CCFF
in 3 digits format as #0CF
, but you cannot do the same on #425416
Maybe this thread can make my point more clear.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…