A colorful chemistry mini-project to visualize the relationship between pH, solution color, and hydrogen ion concentration.
Built using Python and Matplotlib for Class 11 Chemistry.
The pH Indicator Visualizer is a simple educational tool designed to help students understand:
- How pH relates to solution color
- How [H⁺] (hydrogen ion concentration) changes across the pH scale
- How acids, bases, and neutral solutions differ visually & numerically
It displays:
- A color block representing the pH value (0 = red, 7 = green, 14 = blue)
- A semilog graph of Hydrogen ion concentration vs pH
- A highlighted marker showing the entered pH value
⚠️ Academic Use Only This project is designed for learning, demonstration, and practical submission purposes. Not intended for chemical analysis or lab instrumentation.
Maps pH → RGB color:
- Acidic (0–7) → Red → Yellow → Green
- Neutral (7) → Pure Green
- Basic (7–14) → Green → Cyan → Blue
Automatically labels input as:
- Acidic (pH < 7)
- Neutral (pH = 7)
- Basic (pH > 7)
- Smooth curve of
10^(-pH) - Semilog scale for readability
- Highlights chosen pH value
ph_indicator_visualizer/
├── ph_visualizer.py
└── README.md
- Python 3.8+
- Matplotlib
- NumPy
pip install matplotlib numpypython ph_visualizer.pyEnter a pH value between 0 and 14 when prompted.
The program displays:
- A color preview block representing the pH
- A Hydrogen Ion Concentration vs pH graph
- Automatic classification (Acidic / Neutral / Basic)
Himali Patil


