move color change to rows

This commit is contained in:
Aaron Riedel 2023-07-18 09:34:55 +02:00
parent ad3429cb94
commit f21a2aec99
Signed by: aaron
GPG key ID: 643004654D40D577

View file

@ -39,11 +39,7 @@ sock = ICMPv6Socket()
# generate IP list # generate IP list
ips=[] ips=[]
for w in range(width): for w in range(width):
for h in range(hight): if (r>=255):
xcoord=x+w
xcoord=f"{xcoord:#05x}".split('x')[-1]
ycoord=hex(y+h).split('x')[-1]
if (r>=255):
if (g>=255): if (g>=255):
if(b>=255): if(b>=255):
r=0 r=0
@ -55,6 +51,10 @@ for w in range(width):
g=g+1 g=g+1
else: else:
r=r+1 r=r+1
for h in range(hight):
xcoord=x+w
xcoord=f"{xcoord:#05x}".split('x')[-1]
ycoord=hex(y+h).split('x')[-1]
colorr=f"{r:#04x}".split('x')[-1] colorr=f"{r:#04x}".split('x')[-1]
colorg=f"{g:#04x}".split('x')[-1] colorg=f"{g:#04x}".split('x')[-1]
colorb=f"{b:#04x}".split('x')[-1] colorb=f"{b:#04x}".split('x')[-1]