change how hexToRGB processes hex

use the optional base parameter instead of 0x, the 0x prefix is a gnuism and doesn't work on all implementations of libc.