i need to do this Create 3 lists, one for red, one for green and one for blue, each containing 256 elements all initialized to 0 For every pixel in the image: Get the amount, r, of red from the pixel Increment position r in the red list Get the amount, g, of green from the pixel Increment position g in the green list Get the amount, b, of blue from the pixel Increment position b in the blue list Return the red, green and blue lists i wrote the code
def colour():
red=[0]*256
for x in range(0, getWidth(img)):
for y in range (0, getHeight(img)):
r= getPixel(img,getWidth(img) ,getHeight(img))
red.append(r)
return (red)
but for some reason i am unable to see the list