def calc_histograms(img_to_show):
    """Calculate histograms

    Get R, G, B histogram values from an image.

    Args:
        img_array (image obj): image object to use
    Returns:
        r (list): list of histogram values for red pixels
        g (list): list of histogram values for green pixels
        b (list): list of histogram values for blue pixels
    """
    out_hist = img_to_show.histogram()
    r = out_hist[0:256]
    g = out_hist[256:512]
    b = out_hist[512:768]
    return r, g, b