From e4306e5435eef76bad7fa9b3b909362304a8a47e Mon Sep 17 00:00:00 2001 From: skylar Date: Sat, 28 Nov 2026 05:59:53 -0800 Subject: luxnox: one palette for light and dark themes palette.toml drives kitty, the dwl desktop (dwl, fuzzel, swaync, wob, wmenu), GTK, Qt, the console and Emacs; luxnox-toggle switches lux and nox. Co-Authored-By: Claude Opus 5.5 --- claude/hooks/make-colors.d.ts | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 claude/hooks/make-colors.d.ts (limited to 'claude/hooks/make-colors.d.ts') diff --git a/claude/hooks/make-colors.d.ts b/claude/hooks/make-colors.d.ts new file mode 100644 index 0000000..24f01db --- /dev/null +++ b/claude/hooks/make-colors.d.ts @@ -0,0 +1,35 @@ +import type { ThemeColors } from 'claude-code' + +type Hex = string + +type Mode = { + gray?: { + anchors?: { 'surface-0': Hex; 'text-primary': Hex } & Partial< + Record<'surface-1' | 'surface-2' | 'surface-3' | 'text-secondary' | 'text-muted', Hex> + > + stops?: Record + } + roles?: Roles + git?: Partial< + Record<'added' | 'removed' | 'modified' | 'merged' | 'closed' | 'conflicting' | 'draft', Hex> + > +} + +type Role = Hex | { seed?: Hex; stops?: Record; fillShade?: number } + +type Roles = Partial> + +/** A whole theme from a few colors, and what fails. Throws on a color it can't use. */ +export function makeColors(definition: { + label: string + id?: string + roles?: Roles + light?: Mode + dark?: Mode + codeTheme?: { light?: string; dark?: string } + contrast?: 'more' + only?: 'light' | 'dark' +}): { theme: ThemeColors; problems: string[] } + +/** What's wrong with a theme from anywhere, as plain lines. */ +export function checkColors(colors: unknown): string[] -- cgit v1.2.3