don't you want to use cameri's solution? I get it that it's easier to use the last, but if suddenly there's pow on the last chars instead of the first, we're back at the same problem.. so excluding leading zeroes from the beginning and using that for hex is more resilient in giving you not so dark colors.. would be good to have a common simple ground on the colors because they're really good to recognise a pubkey. the more it works across different apps the better..
Discussion
with cameri's solution, you can only get a full black hex color if the pubkey is all zeroes...