I have coded a discord bot using my Windows 11 computer, with python 3.12.3.
Searching for a hosting way, a friend shared me her private server running RetroPi project.
When running my code on my computer, it works fine and fetches the image with the good colors. But the problem is that when i run it on the server, the images aren't working properly cause the colors are mismatched. see images below:
good colors:
,
bad colors

At first i thought it was because the discord versions were not the same (3.9 on the server), so i asked my friend to update, what she did but now with 3.12.3 on both sides, the colors aren't working neither.
The color fetching is made by this function which i think is the problem but i'm not sure :
class EnumColorPixelya:
ENUM = []
@staticmethod
def getColors(canvas):
colors = canvas['colors']
for i, color in enumerate(colors):
EnumColorPixelya.ENUM.append(Color(i, tuple(color)))
@staticmethod
def index(i):
for color in EnumColorPixelya.ENUM:
if i == color.index:
return color
return EnumColorPixelya.ENUM[0]
I have no idea how to fix this as this is working on one device and not on the other one, so it's not a python error properly talking.
Here is my Github Repo with the code, the cog is areaDownload.py.