Bit of a weird method but it's pretty compact
Thanks to @KlimbRio1 for sharing that the number of Hex digits can be found using ⌊log([Decimal number])/log(16)⌋+1, because I basically used that but with a 2 instead of 16 in this project Thanks to @cs4912647 for the 0+((0b) Join ()) trick to convert Binary to Decimal