Skip to content

maxwellyu1024/color-extractor

Repository files navigation

Color Extractor

Color Extractor is a powerful web application that allows users to extract and analyze the dominant colors from images. Built with Next.js and React, it provides an intuitive interface for uploading images or using image URLs for color analysis and visualization.

Features

  • Upload images or provide image URLs for color analysis
  • Extract dominant colors using K-means clustering algorithm
  • Adjust the number of colors to extract
  • Choose different color spaces (RGB, HSL, LAB) for analysis
  • Resize images for improved performance and accuracy
  • Customize export options including layout and color formats
  • Export results as JSON or PNG
  • Interactive color charts (pie and bar) for visual representation
  • Copy color values in various formats (HEX, RGB, HSL, HSV, CMYK, LAB)
  • Analyze color harmony and suggest color schemes
  • Provide harmony scores for different color combinations
  • Generate complementary, triadic, and analogous color schemes

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/color-extractor.git
    
  2. Navigate to the project directory:

    cd color-extractor
    
  3. Install dependencies:

    npm install
    
  4. Run the development server:

    npm run dev
    
  5. Open http://localhost:3000 in your browser to see the application.

Usage

  1. Upload an image or provide an image URL.
  2. Adjust the number of colors to extract using the slider.
  3. Toggle the "Resize Image" option if needed and select a preset size or enter custom dimensions.
  4. Click the "Extract Colors" button to analyze the image.
  5. View the extracted colors, their percentages, and various color format representations.
  6. Use the chart toggle to switch between pie and bar chart visualizations.
  7. Export the results as JSON or PNG using the provided buttons.

Technologies Used

  • Next.js
  • React
  • TypeScript
  • Tailwind CSS
  • shadcn/ui components
  • Color Thief library
  • Recharts for data visualization

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published