function norm16(v) {
    v = parseInt(v, 16);
    return size == 2 ? v :         // 16 bit
           size == 1 ? v << 4 :    // 8 bit
           v >> (4 * (size - 2));  // 24 or 32 bit
  }
Convert a legacy X11 color value into an CSS rgb(...) color value.

They take the form:
12 bit: #RGB          -> #R000G000B000
24 bit: #RRGGBB       -> #RR00GG00BB00
36 bit: #RRRGGGBBB    -> #RRR0GGG0BBB0
48 bit: #RRRRGGGGBBBB
These are the most significant bits.

Truncate values back down to 24 bit since that's all CSS supports.

@param {string} v The X11 hex color value to convert.
@return {?string} The CSS color value or null if the value could not be
    converted.