Skip to content

CodeByTinku/Color-Finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎨 Color Finder - Professional Palette Explorer

A beautiful, modern, and fully responsive color palette explorer built with React 18, JavaScript, Tailwind CSS, and Vite. Explore 150+ beautiful colors with complete color information, gradient previews, and WCAG contrast checking.

Color Finder JavaScript Tailwind CSS Vite

✨ Features

Core Features

  • 🎨 150+ Beautiful Colors: Predefined color palette with complete information
  • πŸ“± Fully Responsive: Mobile-first design (2-col mobile, 4-col tablet, 6-col desktop)
  • πŸ” Search & Filter: Search by name or HEX code
  • 🏷️ Categories: Filter by All, Red, Blue, Green, Pastel, Dark, Neon
  • 🎲 Random Color: Get random colors with one click
  • πŸ“‹ Copy to Clipboard: Copy HEX, RGB, RGBA, HSL values instantly
  • πŸŒ“ Dark/Light Mode: Toggle with persistence in localStorage
  • ⌨️ Keyboard Shortcuts:
    • Space - Get random color
    • Esc - Close modal

Advanced Features

  • 🎭 Color Modal: Detailed view with all color formats
  • 🌈 Gradient Preview: See 2-3 color gradients automatically generated
  • β™Ώ WCAG Contrast Checker: Check accessibility compliance (AA/AAA)
  • ✨ Smooth Animations: Framer Motion powered transitions
  • πŸ’Ž Glassmorphism UI: Modern glass-effect design
  • 🎯 Hover Effects: Scale and shadow effects on color cards

πŸš€ Quick Start

Installation

# Clone or navigate to the project
cd color-finder

# Install dependencies
npm install

# Start development server
npm run dev

The app will be available at http://localhost:5173

Build for Production

npm run build
npm run preview

πŸ“ Project Structure

color-finder/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ ColorCard.jsx          # Individual color card
β”‚   β”‚   β”œβ”€β”€ ColorGrid.jsx          # Grid layout for colors
β”‚   β”‚   β”œβ”€β”€ ColorModal.jsx         # Detailed color information modal
β”‚   β”‚   β”œβ”€β”€ SearchBar.jsx          # Search input component
β”‚   β”‚   β”œβ”€β”€ CategoryTabs.jsx       # Category filter tabs
β”‚   β”‚   β”œβ”€β”€ RandomColorButton.jsx # Random color generator
β”‚   β”‚   β”œβ”€β”€ DarkModeToggle.jsx    # Theme switcher
β”‚   β”‚   β”œβ”€β”€ Toast.jsx              # Notification toast
β”‚   β”‚   β”œβ”€β”€ GradientPreview.jsx   # Gradient preview component
β”‚   β”‚   └── ColorContrastChecker.jsx # WCAG contrast checker
β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   β”œβ”€β”€ useColors.js           # Color filtering and search logic
β”‚   β”‚   β”œβ”€β”€ useModal.js            # Modal state management
β”‚   β”‚   β”œβ”€β”€ useCopyToClipboard.js # Clipboard functionality
β”‚   β”‚   └── useDarkMode.js         # Dark mode with localStorage
β”‚   β”œβ”€β”€ data/
β”‚   β”‚   └── colors.js               # 150+ color definitions
β”‚   β”œβ”€β”€ App.jsx                    # Main application component
β”‚   β”œβ”€β”€ main.jsx                   # Application entry point
β”‚   └── index.css                  # Global styles + Tailwind
β”œβ”€β”€ index.html
β”œβ”€β”€ vite.config.js
β”œβ”€β”€ tailwind.config.js
β”œβ”€β”€ postcss.config.js
└── package.json

🎯 Usage

Basic Usage

  1. Browse Colors: Scroll through the color grid
  2. Search: Type in the search bar to find colors by name or HEX
  3. Filter: Click category tabs to filter colors
  4. View Details: Click any color card to see complete information
  5. Copy Values: Click copy icons in the modal to copy color values
  6. Random Color: Click the shuffle button or press Space key

Color Information Modal

When you click a color, you'll see:

  • HEX: #FF6B6B
  • RGB: rgb(255, 107, 107)
  • RGBA: rgba(255, 107, 107, 1)
  • HSL: hsl(0, 100%, 70%)
  • Gradient Preview: 2-3 automatically generated gradients
  • WCAG Contrast: Accessibility compliance checker

Keyboard Shortcuts

  • Space: Get a random color and copy its HEX
  • Esc: Close the color information modal

πŸ› οΈ Tech Stack

  • React 18 - UI framework
  • JavaScript (ES6+) - No TypeScript
  • Vite - Build tool and dev server
  • Tailwind CSS - Utility-first CSS framework
  • Framer Motion - Animation library
  • React Icons - Icon library

🎨 Customization

Adding More Colors

Edit src/data/colors.js:

{ 
  name: "Your Color Name", 
  hex: "#HEXCODE", 
  rgb: "rgb(r,g,b)", 
  category: "Category" 
}

Changing Theme Colors

Edit tailwind.config.js to customize:

  • Gradient colors
  • Glassmorphism effects
  • Animation timings

Modifying Grid Layout

Edit ColorGrid.jsx to change responsive breakpoints:

className="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6"

πŸ“± Responsive Design

  • Mobile (< 640px): 2 columns
  • Tablet (640px - 1024px): 3-4 columns
  • Desktop (> 1024px): 6 columns

🌐 Deployment

Vercel

npm install -g vercel
vercel

Netlify

npm run build
# Drag and drop the 'dist' folder to Netlify

GitHub Pages

  1. Update vite.config.js:
export default defineConfig({
  base: '/your-repo-name/',
  // ...
})
  1. Build and deploy:
npm run build
# Deploy dist folder to gh-pages branch

🎁 Bonus Features

WCAG Contrast Checker

  • Automatically calculates contrast ratios
  • Shows AA/AAA compliance levels
  • Recommends best text color (white/black)

Gradient Preview

  • Automatically generates 2-3 color gradients
  • Shows different gradient directions
  • Updates when color changes

πŸ“ License

MIT License - feel free to use this project for personal or commercial purposes.

🀝 Contributing

Contributions are welcome! Feel free to:

  • Add more colors
  • Improve accessibility
  • Add new features
  • Fix bugs
  • Improve documentation

πŸ“§ Support

For issues, questions, or suggestions, please open an issue on GitHub.


Made with ❀️ using React, Tailwind CSS, and Vite

About

A beautiful, modern, and fully responsive color palette explorer, which help to pick the right color you want.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors