nip-c1

Profile Colors

A proposal for pubkey-derived colors that can be used as unique profile colors.

This simple spec is optimized for the usability and readability of the colors in actual UIs: as text (profile name), as backgrounds, as indicator dots, as borders, etc.

Works in dark, grey, sepia, ivory, light, etc. modes.

Color Derivation

  1. Convert HEX pubkey to integer
  2. Calculate Hue: integer % 360
  3. Set Saturation to 70%
  4. Set Value/Brightness based on Hue:
    • 75% for Hue 32–204
    • 96% for Hue 216–273
    • 90% otherwise
  5. Convert HSV to RGB

Text Adjustment

When using the profile color for text (author names, mentions, etc.), adjust brightness for readability:

  • Dark mode: increase brightness by 8%
  • Light mode: decrease brightness by 5%
Published:
January 22, 2026 14:14
Write a comment
No comments yet.