ChromaMood is a semantic search engine that allows users to find the perfect color palette based on emotions, vibes, and descriptions rather than just hex codes.
Instead of searching for "blue and green," you can search for "a lonely rainy night in a futuristic city" or "the feeling of eating a fresh lemon on a summer morning."
- Semantic Search: Uses Natural Language Processing (NLP) to understand the "vibe" of your query.
- Vector Database: Powered by OpenSearch for high-performance k-NN (k-Nearest Neighbors) retrieval.
- Lightweight AI: Uses the
all-MiniLM-L6-v2Sentence-Transformer model for local embedding generation (no API costs!). - Interactive UI: A sleek, user-friendly interface built with Streamlit.
- JSON-Driven: Easy to expand by simply adding new palettes to a JSON file.
- Language: Python 3.9+
- Search Engine: OpenSearch (Vector Database)
- AI Model: Sentence-Transformers (Hugging Face)
- Frontend: Streamlit
- DevOps: Docker & Docker Compose
ChromaMood/
├── data/
│ └── palettes.json # The source of truth for your 100+ vibes
├── src/
│ ├── app.py # Streamlit UI
│ ├── indexer.py # Data processing & OpenSearch
│ ├── search_engine.py # Vector search logic
│ └── config.py # Central configuration settings
├── docker-compose.yml # OpenSearch setup
└── requirements.txt # Python dependencies
Follow these steps to set up the project locally on your machine.
Open your terminal and run:
git clone [https://github.com/your-username/ChromaMood.git](https://github.com/your-username/ChromaMood.git)
cd ChromaMoodThis project requires OpenSearch running as a vector database. Use the provided Docker Compose file to start it:
docker-compose up -dNote: Wait about 20-30 seconds for the database to fully initialize before running the indexer.
It is highly recommended to use a virtual environment (venv):
# Create and activate venv
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate
# Install required packages
pip install -r requirements.txt
pip install "huggingface_hub<0.25.0"Run the indexer script to process your data/palettes.json and upload the embeddings to OpenSearch:
# On Windows
set PYTHONPATH=.
python src/indexer.py
# On Mac/Linux
export PYTHONPATH=.
python3 src/indexer.pyStart the Streamlit interface:
streamlit run src/app.py