add weird color pattern
This commit is contained in:
parent
ac6fe6b66d
commit
ad3429cb94
1 changed files with 17 additions and 5 deletions
22
pingplace.py
22
pingplace.py
|
@ -24,13 +24,13 @@ def one_ping(socket, address):
|
||||||
print(err)
|
print(err)
|
||||||
|
|
||||||
# settings
|
# settings
|
||||||
x=1
|
x=0
|
||||||
y=1
|
y=0
|
||||||
width=512
|
width=512
|
||||||
hight=512
|
hight=512
|
||||||
r=0xff
|
r=0
|
||||||
g=0xff
|
g=0
|
||||||
b=0xff
|
b=0
|
||||||
prefix="2a01:4f8:c012:f8e6:1"
|
prefix="2a01:4f8:c012:f8e6:1"
|
||||||
|
|
||||||
# open socket
|
# open socket
|
||||||
|
@ -43,6 +43,18 @@ for w in range(width):
|
||||||
xcoord=x+w
|
xcoord=x+w
|
||||||
xcoord=f"{xcoord:#05x}".split('x')[-1]
|
xcoord=f"{xcoord:#05x}".split('x')[-1]
|
||||||
ycoord=hex(y+h).split('x')[-1]
|
ycoord=hex(y+h).split('x')[-1]
|
||||||
|
if (r>=255):
|
||||||
|
if (g>=255):
|
||||||
|
if(b>=255):
|
||||||
|
r=0
|
||||||
|
g=0
|
||||||
|
b=0
|
||||||
|
else:
|
||||||
|
b=b+1
|
||||||
|
else:
|
||||||
|
g=g+1
|
||||||
|
else:
|
||||||
|
r=r+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]
|
||||||
|
|
Loading…
Reference in a new issue