Hi I want to make a game with rhombus what I want to fix is that I set the clock to XY and in while true cycles I have function with one built me a cube

I want to create a game with levels on each level a cube will be made again with another random variation of colors. I have not levels method created yet so I want to create a cube with some colors and after a restarting code, It should be another color variation. But I can not fix a blinking.
my code:
import pygame as pg
import random
pg.init()
screen = pg.display.set_mode((500, 800))
clock = pg.time.Clock()
BG_COLOR = pg.Color('black')
WHITE = pg.Color('white')
ORANGE = pg.Color('orange')
BLUE = pg.Color('blue')
RED = pg.Color('red')
PURPLE = pg.Color('purple')
m = 8
def rhumbus(screen,color,plus):
point1=(170, 500-plus)
point2=(350, 500-plus)
point3=(300, 550-plus)
point4=(120, 550-plus)
points=[point1, point2, point3, point4]
return pg.draw.polygon(screen,color, points)
def cube(rando):
plus = -72
old_col = None
for x in range(0,10):
rando = random.choice([RED,ORANGE,RED,BLUE,WHITE])
if rando != old_col:
rhumbus(screen,rando,plus)
plus += 8
old_col = rando
else:
rhumbus(screen,PURPLE,plus)
plus += 8
old_col = rando
done = False
while not done:
for event in pg.event.get():
if event.type == pg.QUIT:
done = True
screen.fill(BG_COLOR)
cube(m)
pg.display.flip()
clock.tick(10)