A professional color palette and design token editor built with SvelteKit and shadcn-svelte.
Edit colors in HEX, RGB, HSL, HSV, and OKLCH. Generate perceptually uniform scales, control lightness, chroma, and hue curves independently, and export to CSS custom properties or JSON design tokens - all in the browser, no backend required.
# install dependencies
pnpm install
# start development server
pnpm dev
pnpm dev # start dev server
pnpm build # production build
pnpm preview # preview production build
pnpm check # svelte-check (TypeScript + Svelte)
pnpm test # run tests in watch mode
pnpm test:run # run tests once
pnpm lint # check formatting and linting
pnpm format # auto-format with Prettier
src/
lib/
color/ # pure color math (parse, convert, interpolate, gamut, contrast, curve)
palette/ # data model types
io/ # importers and exporters
stores/ # Svelte 5 reactive state (palette, theme)
data/ # design system presets (Tailwind, Material 3, Radix, Open Color)
components/
app/ # domain-specific UI components
ui/ # shadcn-svelte base components
routes/ # SvelteKit pages
tests/
unit/color/ # unit tests for all color math modules
All color math lives in src/lib/color/ as pure TypeScript functions with no Svelte
dependency. The central store (palette.svelte.ts) manages state via a commit() pattern
that snapshots history before every mutation. UI components read from the store and delegate
all mutations back through it.
OKLCH is the internal canonical format. Input in any format is converted to OKLCH on import. Output is converted from OKLCH to the requested format on export.
MIT - see LICENSE