code: def levels(self):
          
          
          
          h = self.img.histogram()
          r = h[0:255]
          g = h[256:511]
          b = h[512:767]
          a = h[768:1024]
          
          return r, g, b, a
docs: Returns a histogram for each RGBA channel.
          
          Returns a 4-tuple of lists, r, g, b, and a.
          Each list has 255 items, a count for each pixel value.