import random
import math
Square(color='white')
pixelSize = 4
for x in range(0,100+pixelSize, pixelSize):
    for y in range(0,100+pixelSize, pixelSize):
        r = int(math.sqrt(((50.0-x)*(50.0-x))+((50.0-y)*(50.0-y)))*3.5)%256
        g = int(math.sqrt(pow(x,2)+pow(y,2))*1.8)%256
        b = int(math.sqrt(((100-x)*(100-x))+((y)*(y)))*1.8)%256
        #rnd = lambda: random.randint(0,255)
        color='#%02X%02X%02X' % (r,g,b)
        Square(x=x, y=y, width=pixelSize+1, height=pixelSize+1, color=color)
#Text(text='#%02X'% int(math.sqrt(10)))

Colors

by NoorsDad

Created 4 weeks, 1 day ago.