tray-resources/README.md
Lilith e5657c6e31 deps-add(core): Add core dependencies and update README with new setup instructions
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-03-08 18:51:31 -07:00

1.2 KiB

@lilith/tray-resources

Shared tray icon resources: SVG templates, color palettes, and a generation script. Also provides a Swift package for macOS apps to consume bundled icons.

Structure

tray-resources/
  palettes/         Color palette JSON files
  templates/        SVG templates using #PLACEHOLDER for color substitution
  scripts/          Icon generation tooling
  generated/        Output PNGs (git-ignored)
  Sources/          Swift package for macOS icon loading
  Package.swift     Swift package manifest

Generating Icons

pip install cairosvg
python scripts/generate-icons.py \
  --palette palettes/default.json \
  --sizes 16,18,24,32,48 \
  --templates templates/

This produces generated/<template>/<color>-<size>.png and <color>-<size>@2x.png for each combination.

Swift Usage

import LilithTrayResources

let icon = TrayResources.image(template: .chatBubble, color: .green, pointSize: 18)

Templates

  • hexagon-hub -- Hexagonal hub-and-spoke icon (life-manager)
  • circle-dot -- Filled circle
  • chat-bubble -- Chat bubble outline (messenger)

Palettes

  • default -- green/red/yellow status colors
  • lilith -- purple theme variants