Global Feed Post Login
Replying to Avatar Niel Liesmons

I needed a unique UI color for npubs that's actually readable / usable.

I couldn't find any derivation scheme that gave me colors that work:

- Chat bubble profiles names

- Across themes (Light, Dark, Ivory, Gray, Sepia, ...)

So I thought up the absolute simplest thing that does work:

nostr:naddr1qvzqqqr4gupzp22rfmsktmgpk2rtan7zwu00zuzax5maq5dnsu5g3xxvqr2u3pd7qqxnzde5xcunjv3e8ycrgve5k58fyd

Avatar
Niel Liesmons 8mo ago

nostr:npub1jlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qdjynqn how do you currently pick chat bubble colors in Flotilla?

Reply to this note

Please Login to reply.

Discussion

Avatar
hodlbod 8mo ago

Just 15 or so hardcoded colors: https://github.com/coracle-social/flotilla/blob/68ebd32e1500bc5a6ac9f5e23c3ed66ea25ca55d/src/app/state.ts#L123

I've used HSL in the past, but never was very happy with the results

Avatar
nosuta 8mo ago

Give the spec I wrote a shot.

https://jsfiddle.net/rq58zgn4/

Avatar
Niel Liesmons 8mo ago

The first color I see is unfortunately not usable in Light mode.

The one for my own pubkey, neither.

Also, why not use the full HEX pubkey to avoid weird or repeating colors with mined keys etc?

Thread collapsed
Thread collapsed
Avatar
Niel Liesmons 8mo ago

I'm very happy with the colors I get:

https://cdn.satellite.earth/96c84e7ddbdb6f3e9c176cbc8d3724cd0c25fb8aad19ced2d3bfb86faf8d225a.mov

Thread collapsed
Thread collapsed