Chromatic Illusion Weaponizer
An experimental visual effects tool powered by Google AI Studio that creates dynamic color transformations, optical illusions, and generative art using AI-driven algorithms.Overview
Chromatic Illusion explores the intersection of artificial intelligence and visual perception, using Google’s Gemini AI to generate color palettes, create optical illusions, and manipulate images in ways that challenge how we perceive color and form.AI Color Generation
Gemini AI generates harmonious and contrasting color schemes
Optical Illusions
Create perception-bending visual effects
Real-Time Processing
Live preview of transformations as you adjust parameters
Export Options
Save as images, CSS, or JSON color data
Features
AI-Powered Color Generation
- Palette Creation
- Color Harmony
- Dynamic Adjustments
Ask Gemini to generate color palettes based on:
- Mood or emotion (“energetic”, “calm”, “mysterious”)
- Natural phenomena (“sunset”, “ocean”, “forest”)
- Cultural references (“cyberpunk”, “vaporwave”, “Art Deco”)
- Abstract concepts (“velocity”, “transformation”, “depth”)
Optical Illusion Effects
Built-in effects that trick perception:Chromatic Aberration
Simulate lens distortion with color channel separation
Color Constancy
Same color appears different based on surrounding context
Motion Illusions
Static patterns that appear to move
Depth Perception
2D patterns that create 3D depth illusions
Afterimage Effects
Complementary color persistence
Simultaneous Contrast
Colors appear different when placed next to each other
Visual Transformations
Technical Implementation
Google AI Studio Integration
Built on Google’s Gemini API:Color Math
Core color manipulation functions:Canvas Rendering
Effects rendered using HTML5 Canvas:Use Cases
Design Exploration
Rapidly explore color directions for branding or UI design
Art Generation
Create unique generative art pieces
Visual Effects
Add eye-catching effects to graphics and videos
Color Theory Learning
Interactive way to understand color relationships
Accessibility Testing
Test color combinations for contrast and visibility
Mood Boards
Generate inspiring color palettes for creative projects
Installation
Get API Key
Sign up for Google AI Studio:
https://ai.google.devGet your Gemini API key
Interface
Control Panel
- Generate
- Effects
- Export
- Settings
- Text input for palette descriptions
- Generate button
- Generated palette display
- Color harmony analysis
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Space | Toggle effect on/off |
G | Generate new palette |
E | Export current view |
R | Reset to original |
1-9 | Quick switch between effects |
↑/↓ | Adjust primary parameter |
Shift + ↑/↓ | Fine adjustment |
Example Prompts
Mood-Based
Mood-Based
- “Energetic and vibrant for a fitness app”
- “Calm and professional for a law firm”
- “Mysterious and dark for a thriller novel”
- “Playful and friendly for a kids’ game”
Nature-Inspired
Nature-Inspired
- “Desert sunset with warm oranges and purples”
- “Deep ocean with blues and teals”
- “Autumn forest with reds and golds”
- “Northern lights with greens and purples”
Cultural/Era
Cultural/Era
- “1980s synthwave aesthetic”
- “Art Deco elegance”
- “Cyberpunk neon”
- “Scandinavian minimalism”
Abstract
Abstract
- “Speed and motion”
- “Growth and transformation”
- “Tension and release”
- “Chaos and order”
Learnings
Key insights from this experiment:Technical
- AI understanding of color is surprisingly sophisticated
- Canvas performance matters - use requestAnimationFrame
- Color space choice affects perception (LAB is more perceptually uniform)
- Caching AI responses dramatically improves UX
Design
- Users prefer seeing reasoning behind AI choices
- Real-time feedback is crucial for creative tools
- Undo/redo is non-negotiable
- Presets help users get started quickly
AI Prompting
- Structured output (JSON) is more reliable than free-form
- Examples in prompt improve consistency
- Explaining constraints gets better results
- Iterative refinement works better than one-shot generation
Future Directions
Animation
Generate color-shifting animations and transitions
Image Analysis
Upload images and extract dominant palettes
3D Effects
Extend to 3D space with WebGL
Collaboration
Multi-user real-time palette generation
Example Output
Prompt: “Cyberpunk Tokyo night scene”Try It Live
Experience Chromatic Illusion Weaponizer in your browser