π¨ Color Picker
  A professional color picker tool with multiple formats, harmonies, and shades generation.

Try Live Demo β
π Overview
A feature-rich color picker that supports 6 color formats, generates harmonies and shades, and includes dark mode support. Built with vanilla JavaScript and no external dependencies.
β¨ Key Features
  - Interactive Color Picker: Canvas-based saturation/lightness square
 
  - Multiple Formats: HEX, RGB, HSL, RGBA, HSLA, CMYK
 
  - Color Harmonies: 5 types (Complementary, Analogous, Triadic, Split-Complementary, Tetradic)
 
  - Shades Generator: Automatic generation of 10 color variations
 
  - One-Click Copy: Copy any format to clipboard
 
  - Recent Colors: History saved to localStorage
 
  - Dark Mode: Toggle between light and dark themes
 
  - Fully Responsive: Works on mobile, tablet, and desktop
 
  - Accessible: WCAG AA compliant
 
π Quick Start
Try Online
Visit the live demo
Run Locally
# Clone the repository
git clone https://github.com/deepv-lab/how-to-build-tools-by-AI-vibe-coding-assistant.git
# Navigate to the demo
cd tools/design/color-picker/demo
# Open in browser
open index.html
 
Build It Yourself
  - Copy the comprehensive prompt
 
  - Paste into Deepv Code, Claude, ChatGPT, or Cursor
 
  - Build your own version!
 
π File Structure
color-picker/
βββ demo/                          # Live demo files
β   βββ index.html                 # HTML structure (250 lines)
β   βββ style.css                  # Styling (628 lines)
β   βββ script.js                  # Functionality (562 lines)
β
βββ prompts/                       # AI prompts
β   βββ COMPREHENSIVE-PROMPT.md    # Single prompt (all-in-one)
β   βββ DESIGN-SPECS.md            # Design system specs
β   βββ 00-OVERVIEW.md             # Project overview
β   βββ sequential/                # Step-by-step prompts
β       βββ 01-PROJECT-SETUP.md
β       βββ 02-CSS-STYLING.md
β       βββ 03-JAVASCRIPT-FUNCTIONALITY.md
β
βββ metadata.json                  # Tool metadata
βββ README.md                      # This file
 
Option 1: Comprehensive Prompt (Fastest)
Use the comprehensive prompt to build everything in one go.
Best for: Powerful AI assistants (Claude Opus, GPT-4, Deepv Code)
1. Open Deepv Code or your AI coding assistant
2. Copy the comprehensive prompt
3. Paste and run
4. Get complete tool in minutes!
 
Option 2: Sequential Prompts (Recommended for Learning)
Follow the step-by-step prompts in the prompts/sequential/ directory.
Best for: Learning how each part works
1. Start with 01-PROJECT-SETUP.md
2. Then 02-CSS-STYLING.md
3. Then 03-JAVASCRIPT-FUNCTIONALITY.md
4. Build incrementally and understand each step
 
π οΈ Technical Details
Technologies
  - HTML5: Semantic markup with Schema.org metadata
 
  - CSS3: Custom properties, Grid, Flexbox
 
  - JavaScript ES6+: Vanilla JS, no frameworks
 
  - Canvas API: For color square rendering
 
  - LocalStorage API: For recent colors and theme
 
  - Clipboard API: For copy functionality
 
Browser Support
  - Chrome/Edge 90+
 
  - Firefox 88+
 
  - Safari 14+
 
  - Opera 76+
 
  - Total Size: 39KB (uncompressed)
 
  - Load Time: < 1s on 3G
 
  - Lighthouse Score: 90+
 
  - No External Dependencies: Except Google Fonts
 
Accessibility
  - WCAG AA Compliant: 4.5:1 contrast ratio
 
  - Keyboard Navigation: Full keyboard support
 
  - ARIA Labels: Proper semantic markup
 
  - Focus Indicators: Visible focus states
 
  - Reduced Motion: Respects user preferences
 
π¨ Design System
Colors
  - Primary: #3B82F6 (Blue)
 
  - Success: #10B981 (Green)
 
  - Error: #EF4444 (Red)
 
  - Gray Scale: 50, 100, 200, 300, 400, 600, 700, 800, 900
 
Typography
  - Font Family: Inter (Google Fonts)
 
  - Monospace: JetBrains Mono (Google Fonts)
 
  - Sizes: 12px - 30px
 
Spacing
  - Based on 4px grid system
 
  - Values: 4px, 8px, 12px, 16px, 20px, 24px, 32px, 40px, 48px
 
See DESIGN-SPECS.md for complete design system.
π Usage
Picking Colors
  - Click or drag on the color square to select saturation and lightness
 
  - Adjust the hue slider to change the base color (0-360Β°)
 
  - Adjust the opacity slider to change transparency (0-100%)
 
  - Click any formatβs copy button to copy the color code
 
Generating Shades
  - Color shades are automatically generated based on your current color
 
  - Click any shade to select it as your current color
 
Creating Harmonies
  - Click a harmony tab (Complementary, Analogous, etc.)
 
  - View the generated harmony colors
 
  - Click any harmony color to select it
 
Recent Colors
  - Colors are automatically saved as you pick them
 
  - Click any recent color to restore it
 
  - Click βClear Allβ to remove all recent colors
 
Dark Mode
  - Click the theme toggle button (π/βοΈ) in the header
 
  - Your preference is saved to localStorage
 
π§ Customization
Change Primary Color
Edit in style.css:
--color-primary-500: #3B82F6; /* Change this */
 
Add More Shades
Edit in script.js:
const lightnesses = [95, 86, 77, 68, 59, 50, 41, 32, 23, 14];
// Add more values
 
Change Initial Color
Edit in script.js:
let currentColor = {
    h: 217,  // Change hue
    s: 91,   // Change saturation
    l: 60,   // Change lightness
    a: 1     // Change alpha
};
 
π€ Contributing
Found a bug or want to improve this tool?
  - Fork the repository
 
  - Make your changes
 
  - Test thoroughly
 
  - Submit a pull request
 
See CONTRIBUTING.md for guidelines.
π License
MIT License - feel free to use this tool in your own projects!
π Credits
  - Built with: Deepv Code
 
  - Design System: Based on Tailwind CSS color palette
 
  - Fonts: Inter and JetBrains Mono from Google Fonts
 
  - Icons: Unicode emoji characters
 
π Links
β Star the repo if you find this useful!
π Built with Deepv Code