{"id":"942c4bab21be79325f6668aa0670539b23d535e23da6b32d208a8421b85d7906","pubkey":"86184109eae937d8d6f980b4a0b46da4ef0d983eade403ee1b4c0b6bde238b47","created_at":1781233602,"kind":30817,"tags":[["d","nip-cm-color-moments"],["title","NIP-CM: Color Moments"],["alt","Nostr Implementation Possibility: NIP-CM: Color Moments"],["k","3367"]],"content":"# NIP-XX: Color Moments\n\n`draft` `optional`\n\nThis NIP defines a way to share color palettes captured from beautiful moments, enabling pre-verbal visual communication through color and emotion.\n\n## Abstract\n\nColor Moments are events that capture 3-6 colors witnessed in a beautiful moment, optionally accompanied by a single emoji representing the feeling and an optional name. This creates a form of visual communication that transcends language barriers.\n\n## Event Kind\n\nThis NIP defines kind `3367` for Color Moment events.\n\n## Event Format\n\n### Color Moment Event (kind 3367)\n\n```json\n{\n  \"kind\": 3367,\n  \"content\": \"<optional single emoji>\",\n  \"tags\": [\n    [\"c\", \"<hex color 1>\"],\n    [\"c\", \"<hex color 2>\"],\n    [\"c\", \"<hex color 3>\"],\n    [\"c\", \"<hex color 4>\"],\n    [\"c\", \"<hex color 5>\"],\n    [\"c\", \"<hex color 6>\"],\n    [\"layout\", \"<layout mode>\"],\n    [\"name\", \"<optional name>\"],\n    [\"alt\", \"Color moment: <hex color 1>, <hex color 2>, ...\"]\n  ]\n}\n```\n\n### Fields\n\n- **content**: Either empty string `\"\"` or a single emoji representing the feeling of the moment (e.g., `🌅`, `✨`, `💙`)\n- **tags**:\n  - `c` tags: Required. 3-6 color tags, each containing a hex color value in the format `#RRGGBB` (case-insensitive)\n  - `layout` tag: Optional. Display layout preference: `horizontal`, `vertical`, `grid`, or `star`\n  - `name` tag: Optional. A short name or title for the color moment (recommended max 50 characters)\n  - `alt` tag: Required. Human-readable description per NIP-31 for clients that don't understand this kind\n\n### Color Tag (`c`)\n\nThe `c` tag represents a color in the palette:\n\n```json\n[\"c\", \"#FF6B9D\"]\n```\n\n- Value MUST be a valid 6-digit hex color prefixed with `#`\n- Colors SHOULD be ordered as the user selected them (typically by visual prominence or emotional importance)\n- Recommended 3-6 colors per event (these are guidelines; clients may choose different limits)\n\n### Layout Tag (`layout`)\n\nThe `layout` tag specifies the preferred visual arrangement of colors:\n\n```json\n[\"layout\", \"horizontal\"]\n```\n\n**Valid layout values:**\n- `horizontal`: Stacked color bands (default if not specified)\n- `vertical`: Side-by-side color columns\n- `grid`: Grid layout (2x2 for 4 colors, 3x2 for 6 colors)\n- `star`: Radial pie-slice arrangement emanating from center (not recommended for 4 colors as it appears identical to grid)\n- `checkerboard`: Colors arranged in a grid pattern (rows and columns based on color count)\n- `diagonalStripes`: Diagonal stripes from top-left to bottom-right\n\nClients that don't support a specified layout SHOULD fall back to `horizontal`.\n\n### Name Tag (`name`)\n\nThe `name` tag provides an optional short name or title:\n\n```json\n[\"name\", \"Sunset at the beach\"]\n```\n\n- Value SHOULD be a short descriptive phrase (recommended max 50 characters)\n- Complements the visual color information with textual context\n- Optional; moments can be purely visual without names\n\n### Example Events\n\n**Sunset moment with emoji, name, and layout:**\n```json\n{\n  \"kind\": 3367,\n  \"content\": \"🌅\",\n  \"tags\": [\n    [\"c\", \"#FF6B9D\"],\n    [\"c\", \"#FFD700\"],\n    [\"c\", \"#F4A460\"],\n    [\"c\", \"#87CEEB\"],\n    [\"layout\", \"horizontal\"],\n    [\"name\", \"Golden hour at the pier\"],\n    [\"alt\", \"Color moment: #FF6B9D, #FFD700, #F4A460, #87CEEB\"]\n  ]\n}\n```\n\n**Six-color grid layout:**\n```json\n{\n  \"kind\": 3367,\n  \"content\": \"🌈\",\n  \"tags\": [\n    [\"c\", \"#FF0000\"],\n    [\"c\", \"#FF7F00\"],\n    [\"c\", \"#FFFF00\"],\n    [\"c\", \"#00FF00\"],\n    [\"c\", \"#0000FF\"],\n    [\"c\", \"#8B00FF\"],\n    [\"layout\", \"grid\"],\n    [\"alt\", \"Color moment: #FF0000, #FF7F00, #FFFF00, #00FF00, #0000FF, #8B00FF\"]\n  ]\n}\n```\n\n**Minimal ocean colors (no emoji, no layout):**\n```json\n{\n  \"kind\": 3367,\n  \"content\": \"\",\n  \"tags\": [\n    [\"c\", \"#0077BE\"],\n    [\"c\", \"#00A5CF\"],\n    [\"c\", \"#48D1CC\"],\n    [\"alt\", \"Color moment: #0077BE, #00A5CF, #48D1CC\"]\n  ]\n}\n```\n\n**Star layout with five colors:**\n```json\n{\n  \"kind\": 3367,\n  \"content\": \"⭐\",\n  \"tags\": [\n    [\"c\", \"#FFD700\"],\n    [\"c\", \"#FF69B4\"],\n    [\"c\", \"#00CED1\"],\n    [\"c\", \"#9370DB\"],\n    [\"c\", \"#98FB98\"],\n    [\"layout\", \"star\"],\n    [\"name\", \"Kaleidoscope\"],\n    [\"alt\", \"Color moment: #FFD700, #FF69B4, #00CED1, #9370DB, #98FB98\"]\n  ]\n}\n```\n\n## Interactions\n\n### Reactions\n\nStandard kind `7` reactions (NIP-25) are used to react to color moments. Clients MAY limit reactions to a curated set of nature/emotion emojis:\n\n`🌅 🌄 ☀️ 🌙 ⭐ ✨ 💫 🌈 🔥 💧 🌊 💚 💙 💛 🧡 ❤️ 💜 🌸 🌺 🍂 🌿 🦋 🐚 👁️`\n\n### Bookmarking\n\nClients MAY support bookmarking color moments using kind `30003` (NIP-51 bookmark lists). A suggested implementation uses a `d` tag identifier like `cherished-hues` or `color-moments`:\n\n```json\n{\n  \"kind\": 30003,\n  \"content\": \"\",\n  \"tags\": [\n    [\"d\", \"cherished-hues\"],\n    [\"e\", \"<color moment event id 1>\"],\n    [\"e\", \"<color moment event id 2>\"],\n    [\"e\", \"<color moment event id 3>\"]\n  ]\n}\n```\n\n### Zaps\n\nColor moments support Lightning Zaps (NIP-57) as a way to appreciate and support creators.\n\n## Display Recommendations\n\nClients SHOULD display color moments as:\n\n1. **Layout respect**: Honor the `layout` tag if present; fall back to `horizontal` if unsupported or unspecified\n2. **Color arrangement**:\n   - `horizontal`: Stacked bands of equal height\n   - `vertical`: Side-by-side columns of equal width\n   - `grid`: 2x2 grid for 4 colors, 3x2 grid for 6 colors, or best-fit grid for other counts\n   - `star`: Radial pie slices emanating from center (equal angles per color)\n   - `checkerboard`: Colors in a rectangular grid (rows × columns based on color count)\n   - `diagonalStripes`: Diagonal bands slanting from top-left to bottom-right\n3. **Emoji overlay**: If content contains an emoji, display it centered over the colors\n4. **Name display**: If `name` tag present, display it alongside author information\n5. **Minimal chrome**: Let the colors be the focus, minimize UI elements\n6. **Interactive features**: Consider supporting layout switching, color copying, and sharing functionality\n\n## Validation\n\nA valid color moment MUST:\n\n1. Be kind `3367`\n2. Have at least 3 `c` tags (recommended maximum of 6, though clients may accept more)\n3. Have all `c` tag values match the regex `/^#[0-9A-Fa-f]{6}$/`\n4. Have an `alt` tag for NIP-31 compatibility\n\nA valid color moment MAY:\n\n1. Have a `layout` tag with value `horizontal`, `vertical`, `grid`, `star`, `checkerboard`, or `diagonalStripes`\n2. Have a `name` tag with a short descriptive text\n3. Have content containing a single emoji (or be empty)\n\n**Note**: The 3-6 color range is a guideline for optimal visual display. Clients should be tolerant of events outside this range while potentially displaying warnings or adjusting layouts accordingly.\n\n## Rationale\n\n### Why a custom kind?\n\nUsing kind 1 (text notes) with custom tags would cause color moments to appear as empty or emoji-only posts in standard clients, creating a confusing user experience. A dedicated kind allows:\n\n- Clients to handle color moments appropriately or ignore them gracefully\n- Clear NIP-31 `alt` tag descriptions for unsupported clients\n- Future extensibility without polluting the text note ecosystem\n\n### Why the `c` tag?\n\nThe `c` tag is short, descriptive, and not currently used for colors in the Nostr ecosystem. It allows efficient relay-level filtering with `#c` queries if needed.\n\n### Why recommend 3-6 colors?\n\n- **Minimum 3**: Ensures enough visual information to convey a moment\n- **Maximum 6**: Keeps palettes focused and visually digestible\n- **Flexibility**: These are guidelines; clients may support different ranges based on their design philosophy\n\nThe 3-6 range balances expressiveness with simplicity, but implementations may be more permissive.\n\n### Why single emoji in content?\n\nThe content field is intentionally minimal (empty or single emoji) to maintain the pre-verbal, visual nature of color moments. Extended text would defeat the purpose of pure visual/emotional communication.\n\n### Why add layout and name tags?\n\n- **Layout tag**: Allows creators to express their artistic intent for how colors should be arranged, while maintaining client flexibility\n- **Name tag**: Provides optional textual context without compromising the pre-verbal nature (complements rather than replaces the visual)\n- **Progressive enhancement**: Both tags are optional, maintaining backwards compatibility with simpler implementations\n\n## Client Implementation Notes\n\nClients implementing this NIP should consider:\n\n1. **Camera integration**: Allow users to capture colors directly from their device camera\n2. **Manual color picker**: Provide a color wheel or palette for manual selection\n3. **Layout preview**: Show real-time preview of different layout options\n4. **Copy functionality**: Enable copying color values (hex codes) for creative reuse\n5. **Remix feature**: Allow users to create new moments based on existing palettes\n6. **Accessibility**: Provide color names alongside hex codes for visually impaired users\n\n## References\n\n- [NIP-25: Reactions](https://github.com/nostr-protocol/nips/blob/master/25.md)\n- [NIP-31: Dealing with Unknown Events](https://github.com/nostr-protocol/nips/blob/master/31.md)\n- [NIP-51: Lists](https://github.com/nostr-protocol/nips/blob/master/51.md)\n- [NIP-57: Lightning Zaps](https://github.com/nostr-protocol/nips/blob/master/57.md)","sig":"e898b7b0645ec877893d1a1611e98f5b899baac384d5d4c77949426cb3d550e07adfcceefe5bbda01dc31d54588838a20a469eaf44fc233e963b0471845c9eb6"}