Function: xterm-rgb-convert-to-16bit

Convert an 8-bit primary color value PRIM to a corresponding 16-bit value.