forked from wiiudev/pyGecko
-
Notifications
You must be signed in to change notification settings - Fork 0
/
colors.py
25 lines (22 loc) · 966 Bytes
/
colors.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#You're probably better off using the GUI version, but...
#https://gbatemp.net/threads/splatoon-colorizer.406463/
from tcpgecko import TCPGecko
from textwrap import wrap
from struct import pack
from binascii import unhexlify
import sys
#!!! WARNING: ColorHax has been known to get permanent bans for users !!!
#!!! USE AT YOUR OWN RISK !!!
tcp = TCPGecko("192.168.0.10") #Wii U IP address
Colors = b""
for i in range(1, 4): #Ignores Alpha since it doesn't use it
Color = wrap(sys.argv[i], 2) #Split it into 2 character chunks
for j in range(3): #Create the RGB floats
Colors += pack(">f", ord(unhexlify(Color[j])) / 256)
Colors += pack(">f", 1.0) #Alpha
tcp.writestr(0x12D53178, Colors) #Only overwrites currently loaded color
#Run a command right after the lobby is "ready"
tcp.s.close()
print("Done!")
#!!! WARNING: ColorHax has been known to get permanent bans for users !!!
#!!! USE AT YOUR OWN RISK !!!