Skip to content

Images in different colors #423

@niccokunzmann

Description

@niccokunzmann

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")

Updated version: https://github.com/niccokunzmann/CosmicEarthMedicine/blob/main/change-color.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions