Convert hexadecimal color triplet to decimal

Given a color as an RGB hex triplet, is there a way in Nix to convert it into decimal values? e.g.:

parseHexColor "#0080ff" == [ 0 128 255 ]

Wonderful, thanks. Amusing that they even had to implement pow and a digit lookup table.