The average of the pixel channels is fairly trivial to calculate, but not necessarily very meaningful - depending on the use case it is more illustrative to find the dominant colors. This answer demonstrates an approach to finding the dominant colors.
Here is a toy example for finding the channel-wise means of the image pixels using the image

import cv2
import numpy as np
im = cv2.imread('opencvtest.png')
# Find the average of each channel across the image
mean = [np.mean(im[:,:,i]) for i in range(im.shape[2])]
print(mean)
[132.6709785196566, 92.74899063496903, 81.57176387455432]
So the average color the code found is

which is consistent with what I would expect from looking at the test image.