def _rgba_for_pixels(pixels): for color in pixels: α, r, g, b = Image.argb_for_color(color) for component in (r, g, b, α): yield component