Converting byte data to hex and then Sending HEX values via Arduino serial

So you want to convert the ASCII representation of a hexadecimal digit (like 'F') to its decimal equivalent (like 15)?

(x >='0' && x <= '9') ? x - '0' : (x >='A' && x <= 'F') ? (x - 'A')+10 : 0

If you want to allow lowercase a-f as well:

(x >='0' && x <= '9') ? x - '0' : (x >='A' && x <= 'F') ? (x - 'A')+10 :  (x >='a' && x <= 'f') ? (x - 'a')+10 : 0