I'll build a comprehensive color theory app with an interactive color wheel, harmony generator, WCAG contrast checker, and colorblind simulator. Let me start by exploring the project structure.
I'll create a comprehensive color theory app with all the requested features. Let me start by building the color utility functions, then the interactive components.
Now let me create the interactive color wheel component:
Now the harmonies display component:
Now the contrast checker:
Now the colorblind simulator:
Now let me create the main App component that brings everything together:
Let me update the index.html title and check the CSS:
Let me add some custom styles for the range input sliders:
Now let me build the project to verify everything works:
Build succeeded! Let me verify the main.tsx imports correctly:
The project builds successfully. Here's a summary of what I built:
Chromatica — Color Theory Studio
A comprehensive color theory app with four interconnected features:
🎨 Interactive Color Wheel
- Canvas-based HSL wheel with hue/saturation in the inner disc and a pure hue outer ring
- Lightness slider with live gradient preview
- Harmony markers and connecting lines drawn on the wheel as you explore relationships
- Drag interaction for smooth adjustments
- Live hex + HSL value display
🎭 Harmony Demonstrations (6 types)
- Complementary (180°), Analogous (±30°), Triadic (120°), Split-Complementary (150°/210°), Tetradic (rectangle), Monochromatic (lightness variants)
- Click a harmony to see its markers plotted on the wheel
- Click any swatch to copy its hex code
◐ Contrast Checker
- Foreground/background color pickers (picker + hex input)
- Live preview with realistic UI: heading, paragraph, buttons, links
- Swap colors button
- Large ratio display with WCAG badges (AA Normal, AAA Normal, AA Large, AAA Large)
- Educational notes about each level
👁 Colorblind Simulator
- 5 vision modes: Normal, Protanopia, Deuteranopia, Tritanopia, Achromatopsia
- Uses Machado simulation matrices on sRGB
- UI status color preview (Success/Warning/Error/Info/Base)
- Side-by-side palette comparison with original vs. simulated hex values
- Prevalence statistics for each condition
Design
- Dark zinc UI with dynamic accent glow backgrounds that shift color based on your selection
- Sticky color wheel on desktop, stacked on mobile
- Tab-based navigation for the right panel
- Subtle glass-morphism with backdrop blur
The entire app lives in src/App.tsx + 4 components + 1 color utility module, with all color math (HSL/RGB conversions, relative luminance, WCAG contrast ratios, colorblind simulation matrices) in src/utils/color.ts.
Files built: src/utils/color.ts, src/components/ColorWheel.tsx, src/components/Harmonies.tsx, src/components/ContrastChecker.tsx, src/components/ColorblindSimulator.tsx, src/App.tsx, index.html, src/index.css