The Camouflage Color Changing Chameleon Challenge
Python, 38 bytes
lambda l:[sum(r)+4>>3for r in zip(*l)]
Rounds the average (towards the nearest integer, with halves rounding up) by adding 4 to the sum, then floor-dividing by 8 via the bit-shift >>3
.
MATL, 8 4 bytes
YmYo
Try it online!
4 bytes saved thanks to beaker!
Explanation:
Ym "Get the average of each column
Yo "And round up
Jelly, 5 bytes
S+4:8
Test suite. (Slightly modified so as to verify all testcases at once.)
S+4:8
S sum (vectorized)
+4 add 4
:8 floor division by 8