TintAI is a lightweight Chrome extension that helps you discover, edit and generate cohesive CSS color palettes for your website. It detects CSS variables used on the current page, lets you tweak them live, exclude variables, save palettes, export them as CSS, and even generate full palettes using AI.
- Highlights / Features
- Tech stack
- Permissions
- Usage
- Installation
- Contributing
- Troubleshooting
- Privacy & Security
- License
- Author
- 🎯 Detects CSS custom variables used on the active webpage and lists them in a side panel.
- 🧩 Live editing: pick colors (hex + alpha), edit values, reset to original values and apply them to the page.
- 📌 Exclude variables you don't want to change.
- ✨ Generate cohesive palettes using AI.
- 🎨 Save and manage favorite palettes.
- 📌 Export filtered variables as CSS.
- ⚙️ Supports Chrome DevTools: inspect and modify CSS variables directly from the DevTools panel.
- TypeScript + React
- Vite
- Tailwind CSS
- Zustand state manager
- react-colorful for color picking
- colorjs.io for color validation/processing
- @google/genai for Gemini integration
The extension requests the following Chrome permissions (manifest v3):
sidePanel— open side panel UIstorage— store API key and saved palettes locallytabs,scripting,activeTab— query and inject content script to read/apply CSS variables
- Open any website (non internal chrome pages).
- Click the extension icon. The side panel reads CSS custom properties from the page and lists them.
- Edit values directly or open the color picker to choose new colors. Changes are applied live to the page.
- Use "Exclude" to ignore variables during generation/export.
- Go to the Generate tab to craft an instruction for Gemini. Provide your Gemini API key and click Generate to create a palette. The extension will attempt to map AI results back to detected CSS variables.
- Save palettes to reuse them later or export the code from the Export tab.
-
Clone the repo
git clone https://github.com/EL-OUARDY/tint-ai.git cd tint-ai -
Install dependencies
npm install
-
Run the development server
npm run dev
This starts Vite — open the extension in Chrome as an unpacked extension pointing to the built output (see below) or use the build step to create production artifacts.
-
Build a production bundle
npm run build
- This runs
tsc && vite buildand outputs the extension to the Vite build directory. The repository already includes abuild/folder used for packaging during development.
- This runs
-
Create a zip ready for publishing
npm run zip
- This runs the build and packages the result into a zip file using
src/zip.jsandgulp-zip.
- This runs the build and packages the result into a zip file using
- Open chrome://extensions/ in Chrome.
- Enable "Developer mode" (top-right).
- Click "Load unpacked" and select the build output directory (for example the folder generated by Vite build or the
build/directory in the repository when running locally). - The extension will appear in the toolbar. Click it to open the side panel for the active tab.
Contributions are welcome. A simple workflow:
-
Fork the repo and create a branch for your change.
-
Follow the existing code style (TypeScript + Prettier). Formatting is available via:
npm run fmt
-
Run and test locally with
npm run devand build withnpm run build. -
Create a PR with a clear description of your changes and any manual testing steps.
Developer notes:
- The project uses
zustandfor state, so look atsrc/hooks/useStore.tsfor global state shape. - UI components live in
src/components/and are split into small primitives undersrc/components/ui/.
- If no variables are detected: make sure the active tab is not a chrome:// or extension page. Try clicking the "Reload" button in the Colors tab to inject the content script.
- If applying variables fails: the extension tries to inject the content script using the
scriptingAPI. If permissions are missing or the tab disallows script injection, you will see console warnings in the extension background console.
- Your Gemini API key is stored locally in
chrome.storage.localand is not transmitted to any third-party server by the extension itself. The extension sends requests directly from the browser to Google's GenAI API when generating palettes. - The extension only reads and writes CSS custom properties on pages you visit; it does not collect or send other page data to external servers.
This project is licensed under the MIT License.
Wadi3 (GitHub: EL-OUARDY)
