Is there any OpenCV code sample to detect average hair color from a picture, without using TensorFlow?

please show your current effort

and please, answer my question !
since you mention tensorflow here, how exactly would it help ?