Words or image in. Palette out.
Turn text or an image into an accessible Tailwind color palette, with a live preview and code export.
- 01DescribeType a theme
- 02Generate8 color roles, 11 shades each
- 03Preview in lightTokens on a real layout
- 04Preview in darkSame palette, dark tokens
From a few words or an image to tokens you can paste into your project
- 01
Describe or upload
Write a theme like “sunset over the sea” or start from an image. The same words always give the same palette, and it works offline. In the app, Shuffle gives you variations. Turn on AI enhancement to let a model suggest the palette from your text.
Written thememidnight jazz mysteriousOr upload an image in the app - 02
Preview
Each color role gets 11 shades (50 to 950), plus semantic tokens for light and dark themes. See them applied to App, Components and Marketing mockups.
Primary#35285bSecondary#2c3757 - 03
Export
Copy or download Tailwind v4, Tailwind v3, CSS variables or TypeScript tokens.
@theme { --color-primary-400: #5e4a9a; --color-primary-600: #302550; --color-secondary-400: #506194; --color-secondary-600: #28314c;}
See the palette on an interface before you ship it
Toggle light or dark, soft or sharp corners. In the app, you can also preview App, Components and Marketing layouts.
Readable text tokens, by default
Huecode picks text shades that reach 7:1 against the background for body text and 4.5:1 for secondary text, in light and dark. The app doesn't show these ratios. Here they're calculated from the palette above, using the same rules.
- Aa--textLight12.59:1AAA
- Aa--text-2Light5.86:1AA
- Aa--accent-fgLight13.08:1AAA
- Aa--accent-soft-fgLight13.65:1AAA
- Aa--textDark12.59:1AAA
- Aa--text-2Dark11.63:1AAA
- Aa--accent-fgDark6.33:1AA
- Aa--accent-soft-fgDark13.58:1AAA
Help shape this tool. It's open source.
Run Huecode locally or host your own copy. Everything except AI enhancement works without an API key; for AI, bring your own Anthropic, OpenAI or Gemini key. Want to contribute? Open an issue first.
Huecode is free. If it saves you time, you can buy me a coffee (opens in a new tab).
$ git clone https://github.com/larisabarabas/huecode.git$ cd huecode$ npm ci$ npm run dev# open http://localhost:5173
Questions before you start
Short answers to what people ask first. Something missing? Open an issue.
What is Huecode?
Huecode is a free, open-source color palette generator. Describe a theme in words or start from an image, and it builds an accessible Tailwind CSS palette you can preview and export.
Is Huecode free?
Yes. Huecode is MIT licensed, so you can run it locally or host your own copy.
Do I need an API key?
No. Huecode generates palettes from text without a key, and gives the same palette for the same words. AI enhancement is optional. On the hosted demo it runs on the maintainer's key, with a monthly cap. If you self-host, you can add your own key for Anthropic, OpenAI or Gemini.
Can I generate a palette from an image?
Yes. Upload an image in the app and Huecode builds the palette from it.
Does Huecode save my text or images?
Not on a server. Your text and images are never stored by Huecode, and images are processed entirely in your browser and never uploaded. Your last generated palette is kept in your browser's local storage on your device, along with the text you typed or the image's filename. Clicking reset replaces it with the default palette.
If you turn on AI enhancement, the written theme is sent through Huecode's server to the AI provider (Anthropic, OpenAI or Gemini) to generate the palette. Huecode doesn't store it, but the provider's own data policy applies. On the hosted demo, AI uses the maintainer's key. If you self-host, you use your own. AI is not available for images.
What does a Huecode palette include?
Each color role gets 11 shades (50 to 950), plus semantic tokens for light and dark themes. You can preview them on App, Components and Marketing mockups.
Is the palette accessible?
Yes. Huecode picks text colors that reach at least 7:1 contrast for body text (WCAG AAA) and 4.5:1 for secondary text (AA), in both light and dark.
What formats can I export?
Tailwind v4, Tailwind v3, CSS variables or TypeScript tokens. Copy them or download them.