move color change to rows
This commit is contained in:
parent
ad3429cb94
commit
f21a2aec99
1 changed files with 5 additions and 5 deletions
10
pingplace.py
10
pingplace.py
|
@ -39,11 +39,7 @@ sock = ICMPv6Socket()
|
|||
# generate IP list
|
||||
ips=[]
|
||||
for w in range(width):
|
||||
for h in range(hight):
|
||||
xcoord=x+w
|
||||
xcoord=f"{xcoord:#05x}".split('x')[-1]
|
||||
ycoord=hex(y+h).split('x')[-1]
|
||||
if (r>=255):
|
||||
if (r>=255):
|
||||
if (g>=255):
|
||||
if(b>=255):
|
||||
r=0
|
||||
|
@ -55,6 +51,10 @@ for w in range(width):
|
|||
g=g+1
|
||||
else:
|
||||
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]
|
||||
colorg=f"{g:#04x}".split('x')[-1]
|
||||
colorb=f"{b:#04x}".split('x')[-1]
|
||||
|
|
Loading…
Reference in a new issue