i use this in alphaama, the only change I make to to hex is remove up to 5 leading zeroes if present (because of pow keys). it works pretty well overall..
Discussion
How many POW keys have you run into? I really like the idea of keeping this simple "pubkey.slice(0,6)" but id also like to have some compatibility with other clients
much less now since npubs... but there are some og accounts nostr:npub1qqqqqqyz0la2jjl752yv8h7wgs3v098mh9nztd4nr6gynaef6uqqt0n47m for example
pow keys with the first 3 bytes being a 24 bit RGB color is a cool thing to mine for... it would only probably take typically 3-4 days to get the exact colour you want
i made my miner search for beginning/contains/end based on the bech32 but this is another option
could you still use slice but start somewhere other than beginning?