avocados/support/operations.py

9 lines
190 B
Python
Raw Normal View History

2014-08-30 17:24:11 +02:00
import pygame
def color_surface(surface, color):
red, green, blue = color
arr = pygame.surfarray.pixels3d(surface)
arr[:,:,0] = red
arr[:,:,1] = green
arr[:,:,2] = blue