
hueframe
A tool for turning a photo into a website color theme. Drop in an image, see its colors applied to a page, adjust the result and export it as CSS variables or JSON design tokens.

Images
About hueframe
Five colors can look lovely sitting next to each other. Working out which one belongs behind the text, which should become a button and whether any of it survives dark mode takes a bit more fiddling. Hueframe lets you see those decisions on a page while you make them.
It extracts a palette from your image and gives the colors jobs: background, surface, text, primary and accent. It adjusts lightness and color intensity with contrast in mind, including choosing readable labels for colored buttons.
The playground has two example pages—a guesthouse and a portfolio—with light, dark and system modes, plus desktop and mobile previews. Their layouts, content and photography stay fixed while the colors change. Your photo supplies the palette, so you can try something completely different without turning the preview into a page about your lunch.
You can edit individual colors, enter hex values and lock the ones you want to keep. Generate another variation and the locked colors stay in place while the rest changes around them. There are sample photos too, if you just want to have a play.
When you find something you like, export the light and dark themes as CSS variables or JSON tokens and use them in your own project. Image processing happens in your browser; the photo isn’t uploaded.
The playground is built with Next.js and TypeScript. The theme package is separate, has no runtime dependencies and works in browsers or Node.js, so you can also use it to build your own theme picker or image-based color controls.
Release history
Version 1.0.3
Fixed
- Fix Chrome showing a previous playground background after changing a sample photo, uploaded image, or theme. Remove the scrolling preview's background-colour animation so the new colour appears without requiring a hover or another repaint.
Added
- Live playground links in the repository and npm package READMEs.
External download
Version 1.0.2
Fixed
- Cancel superseded sample and upload requests, and discard late state updates so an earlier image cannot replace the latest selection.
- Run palette extraction in a Web Worker to keep the playground responsive while sampling.
- Reuse completed sample palettes and avoid regenerating themes for unrelated UI changes.
- Handle failed and cancelled image decodes without leaving the playground loading indefinitely.
- Release replaced upload URLs and finished workers, and disable export while a new image is loading.
Added
- Regression tests for image loading, cancellation, worker cleanup, and extraction failures.
External download
Version 1.0.1
Added
- GitHub icon link beside Export CSS, opening the hueframe repository in a new tab with an accessible label.
Fixed
- Visible keyboard focus for links.
- Header actions wrap on narrow screens to keep the export button and repository link together.
External download
Version 1.0.0
Initial release of hueframe.
Added
- Framework-independent TypeScript package with zero runtime dependencies and ESM exports.
- Deterministic palette extraction from image pixels, RGBA buffers, and hex colour lists, using Oklab clustering and population weights.
- Light and dark theme generation with background, surface, text, primary, and accent roles, configurable contrast targets, readable labels, manual colour edits, and role locking.
- Theme variations, colour conversion utilities, and contrast reports.
- CSS custom property and JSON design token exports, including light and dark theme sets.
- Next.js playground with image upload, drag and drop, clipboard paste, and eight sample photos.
- Guesthouse and Portfolio previews with desktop and mobile layouts, light/dark/system modes, editable theme roles, and CSS/JSON export dialogs.
- Browser-local image processing, bundled CC0 photography with source credits, and MIT licensing.
- Unit tests for colour conversion, contrast, palette extraction, theme generation, and exports.
External download




















