Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images in different colors #423

Open
niccokunzmann opened this issue Jan 12, 2025 · 0 comments
Open

Images in different colors #423

niccokunzmann opened this issue Jan 12, 2025 · 0 comments

Comments

@niccokunzmann
Copy link

Hello, I made the image pink for you!

grafik

This is the code I use with Python to change the color:

pip install pillow numpy
>>> from PIL import Image
>>> import numpy as np
>>> im_frame = Image.open('static/img/texture-bw.png')
>>> np_frame = np.array(im_frame)
>>> b = (np_frame * np.array([194/256, 123/256, 170/256])//1).astype(np.uint8)  # this numbers here are the primary color of the pink theme
>>> im = Image.fromarray(b)
>>> im.save("static/img/texture-pink.png")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant