A Next.js application that allows users to generate images using AI (Google Gemini), convert them into color-by-number templates, and interactively color them.
- Generate images using Google Gemini AI based on text prompts
- Automatically convert images into color-by-number templates
- Interactive coloring with a palette of colors
- Highlight regions of the selected color using a checkerboard pattern
- Adjustable difficulty levels (number of colors)
- Export the final colored image
- Node.js 18.0 or later
- A Google Gemini API key (get one from Google AI Studio)
- Clone the repository
- Install dependencies:
pnpm install- Create a
.env.localfile in the root directory and add your Gemini API key:
GEMINI_API_KEY=your_api_key_here
- Run the development server:
pnpm dev- Open http://localhost:3000 with your browser to see the app.
- Enter a prompt in the text field (e.g., "a cozy forest cabin")
- Click "Generate" to create an image
- Once the image is processed, select a color from the palette
- Click on the numbered regions to color them
- Use the controls to toggle the template view, get hints, or reset the coloring
- Export your finished artwork when done
- Next.js 15
- React 19
- Google Gemini API for image generation
- Canvas API for image processing and rendering
- Tailwind CSS for styling