Convert 6 digit hex values to 10bit rgb

Why are you trying to stretch 255 to 1023?

Because the LED Driver takes values 0 - 1023 for each channel.

My computer application will output FFFFFF for white, therefore I need to convert it.
colour = FFFFFF
r = 255, g = 255, b = 255.
r = 1023, g = 1023, b = 1023.

and for any other hex value.

Is there a function that converts an ASCII hex value to numeric?