import pygame as pg, random
pg.init()
pg.display.set_caption("Igranje bojama")
(sirina, visina) = (300, 300)
prozor = pg.display.set_mode((sirina, visina))

def nasumicna_boja():
    r = random.randint(0,255)
    g = random.randint(0,255)
    b = random.randint(0,255)
    BOJA = (r, g, b)
    return BOJA


prozor.fill(nasumicna_boja())
pg.draw.line(prozor, nasumicna_boja(), (50, 250), (250, 50), 3)


pg.display.update()
while pg.event.wait().type != pg.QUIT:
    pass
pg.quit()






