Interactive notebook to showcase how each channel affects the color model. This has been done with Look Up Tables (or LUTs) and applying gamma correction after each color balance.
You will need OpenCV, iPyWidgets and Jupyter for running the interactive notebook.
python3 -m pip install opencv-python matplotlib ipywidgets jupyter
Then simply execute jupyter and run all.
git clone https://github.com/ggcr/color_balance.git
cd color_balance
jupyter notebook color_balance.ipynb