Why do 3 digit hex css colors convert to 6 the way they do?
convention, css, styles
Solution
From the W3C spec:
The three-digit RGB notation (#rgb) is converted into six-digit form (#rrggbb) by replicating digits, not by adding zeros. For example, #fb0 expands to #ffbb00. This ensures that white (#ffffff) can be specified with the short notation (#fff) and removes any dependencies on the color depth of the display.
You can read more about it here: http://www.w3.org/TR/css3-color/
Problem
I'm aware that the method to convert a 3 digit hex css color to 6 digit code is by duplicating each hex digit once, as below. ``` #ABC === #AABBCC ``` Why does it work this way? Why isn't `#ABC` equivalent to `#A0B0C0`?