Event JSON
{
"id": "c947c1436a9a6e9992dd0c04feef5122efec467a7525fdcbbc996aa34f155961",
"pubkey": "3c7d12a6c2f71fe9ca2527216f529a137bb0f2eb018b18f30003933b9532013e",
"created_at": 1718894832,
"kind": 30023,
"tags": [
[
"d",
"1718894509489"
],
[
"title",
"NUD: Pubkey to colors"
],
[
"summary",
"npub is nonsense to display"
],
[
"t",
"nostr"
],
[
"image",
"https://github.com/1l0/hexpattern/blob/master/images/pubkey2colors.png?raw=true"
],
[
"published_at",
"1718894818"
],
[
"alt",
"This is a long form article, you can read it in https://habla.news/a/naddr1qvzqqqr4gupzq0raz2nv9acla89z2fepdaff5ymmkrewkqvtrresqqun8w2nyqf7qqxnzde38qurjdp4xqungwpehx4tna"
]
],
"content": "# NUD: Pubkey to colors\n\nThis NUD defines how to convert pubkey to colors.\n\n[Live demo](https://1l0.github.io/hexpattern/)\n\n## Why?\n\n- `npub` is nonsense to display.\n - too long.\n- `npub1bla...bla` is nonsense to display.\n - `npub1` takes too much space.\n - `...` means nothing.\n\n## Specs\n\n- Uses hex pubkey.\n- Converts 64 characters to 8 colors.\n - Splits 64 with 8 length chunks.\n - Converts each 2 in 8 into\n - Alpha (0-255 -\u003e 0.0-1.0)\n - Hue (0-255 -\u003e 0.0-360.0)\n - Saturation (0-255 -\u003e 0.0-1.0)\n - Light (0-255 -\u003e 0.0-1.0)\n- Supports dark and light theme.\n - When Light is 1.0, flip the Light for light theme (0.0).\n",
"sig": "73e461d4a73121d47fd8d2663d6f901133665fb3cf6a7ac54c341c5826fb87db7a0c65edba2836c1debbe330a4004cdbf56460e0dc1a3f3a30871c4302c01c82"
}