damus now uses the last hex chars instead of the first when calculating username color in dark mode

Reply to this note

Please Login to reply.

Discussion

Channels are fixed! And fast! Will be pushing an update soon.

I should call the next version "ok can you guys stop developing". I want to get to lightning tipping!

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..

with cameri's solution, you can only get a full black hex color if the pubkey is all zeroes...

Never heard of this. Seems fine. I was lazy and just did a quick fix. Maybe will get back to this when there's a nip.

`hex_value.replace(/^0*([1-9a-f][0-9a-f]{5}).*$/, (m, p1) => p1)`

Testing:

#[6]