276d2bb6-619d-4888-ba11-8a6.../Sources/ui/Theme.swift
徐翔宇 4e22618364 v0.1.0: initial 划词侠 — AI Text Actions plugin for MioIsland
Quick AI actions on clipboard or selected text. Four actions:
- 翻译 (中/英/日)
- 总结 (3-bullet Chinese)
- 改语气 (正式/口语/友好/严谨)
- 邮件回复

Powered by DeepSeek with Server-Sent Events streaming for
typewriter feedback (~600ms first byte). Two source modes:
clipboard (no permission) and selected-text via NSAccessibility
(graceful fallback to clipboard + permission banner if denied).

Five-state UI machine: idle → input → loading (cancellable) →
result → missing-config. Last 20 actions persisted to UserDefaults.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 20:21:17 +08:00

42 lines
1.4 KiB
Swift

//
// Theme.swift
// plugin
//
// Same visual language as pure black panel + lime accent.
//
import SwiftUI
enum ClipperTheme {
// Lime accent same value as `#d4ff3a`.
static let lime = Color(red: 0xD4/255, green: 0xFF/255, blue: 0x3A/255)
// Soft cyan for "info" affordances (translate-target chips, etc.)
static let cyan = Color(red: 0x6E/255, green: 0xE7/255, blue: 0xFF/255)
// Warning amber for permission banners.
static let amber = Color(red: 0xFF/255, green: 0xC4/255, blue: 0x54/255)
// Soft red for error / cancel states.
static let danger = Color(red: 0xFF/255, green: 0x6E/255, blue: 0x6E/255)
// Panel background.
static let panelBg = Color(red: 0x05/255, green: 0x05/255, blue: 0x05/255)
// Subtle white overlays.
static let overlay04 = Color.white.opacity(0.04)
static let overlay06 = Color.white.opacity(0.06)
static let overlay08 = Color.white.opacity(0.08)
static let overlay12 = Color.white.opacity(0.12)
static let overlay18 = Color.white.opacity(0.18)
// Foreground tints.
static let fgPrimary = Color(red: 0xF4/255, green: 0xF4/255, blue: 0xF5/255)
static let fg85 = Color.white.opacity(0.85)
static let fg70 = Color.white.opacity(0.7)
static let fg55 = Color.white.opacity(0.55)
static let fg45 = Color.white.opacity(0.45)
static let fg40 = Color.white.opacity(0.4)
static let fg35 = Color.white.opacity(0.35)
}