hexpattern 0.3.0 copy "hexpattern: ^0.3.0" to clipboard
hexpattern: ^0.3.0 copied to clipboard

Nostr pubkey to colors

pub package

hexpattern #

pubkey to colors

A reference implementation of Nostr pubkey to colors.

Live demo

Why? #

  • npub is nonsense to display.
    • too long.
  • npub1bla...bla is nonsense to display.
    • npub1 takes too much space.
    • ... means nothing.

Specs #

  • Uses hex pubkey.
  • Converts 64 characters into 8 colors.
    • Splits 64 with 8 length chunks.
    • Converts each 2 in 8 into AHSL.
      • Alpha (0-255 -> 0.0-1.0)
      • Hue (0-255 -> 0.0-360.0)
      • Saturation (0-255 -> 0.0-1.0)
      • Light (0-255 -> 0.0-1.0)
  • Supports dark and light theme.
    • When Light is 1.0, flip the Light for light theme (0.0).
2
likes
0
points
191
downloads

Publisher

verified publisheroykot.tokyo

Weekly Downloads

Nostr pubkey to colors

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on hexpattern